Page 1 of 1
All local at bottom of script
Posted: Wednesday 20 December 2017 13:15
by poudenes
Hi There,
I tried but didn't work. Is there a way to put all the local variables at the bottom of a script.
So i see the script instead of scrolling down to edit?
Re: All local at bottom of script
Posted: Wednesday 20 December 2017 16:59
by BakSeeDaa
Doing what you described would change the scope of the variable and will probably change how it works.
Code: Select all
myVar = 123 -- Assign 123 to a global variable
local myVar -- Define a new different variable (a local scope variable) using the same name
myVar = 123 -- 123 will be assigned to the local variable myVar from now on.
It's all about the variables scope. You can
read about it.. This has nothing to do with dzVents, it's pure Lua.
So don't change your scripts like that.

Re: All local at bottom of script
Posted: Monday 25 December 2017 21:46
by poudenes
thanks
