Still have questions? Join our Discord server and get real time help.
Log in to vote

Is there any use in declaring a variable local instead of global in the beggining of a script? W

Asked by 2 months ago

I see a lot of scripts having the first variables local, why?

Please use the site question search there are a lot of answers for this common question. kingdom5 5080 — 2mo
you can access global variables anywhere in a script, though for local variables you can only access it inside its scope EXpodo1234ALT 1328 — 2mo
Right... But i mean, when declaring it local righ in the beggining iisnt the scope the whole script? so isn't it useless? or am i missing something? Kiriyato 15 — 1mo

Answer this question