#what happened to the variable?

35 messages · Page 1 of 1 (latest)

karmic nebula
#

could i see the script?

#

where do you originally define your region variable?

humble windBOT
#

studio** You are now Level 28! **studio

viral axle
#

probably stays nil always

#

so region will be nil

#

remove the if region ~= nil then

#

and see if it works

karmic nebula
#

thats where you change its value

#

im looking for where you create it

#

oh then its the scope

#

wait no

#

can you show me the entire script?

#

or is it super long?

#

thats fine you can send it

#

i recommend you search up a tutorial about scope

#

thats the issue here

#

also why didnt you make region a local variable

#

i understand your logic, but you cant define it there

#

by default, region is nil until you define it

#

but before defining it, you checked if it was nil, so it will always be nil

#

yea

#

just before the if then statement

#

make it a local variable

#

can you send what you have?

#

inside the loop should be fine

#

can you send me what you currently have for the code

#

oh you have to give a value to region

#

sorry forgot to mention that

#

without giving it a value its still nil

#

oh

#

that would help alot

quartz trout
#

shouldnt you do if region == nil?

#

to set it to whatever it needs to be

#

if its nil

karmic nebula
#

yea thats what he said he was doing wrong