Thread
:
Basic question regarding variable scope
View Single Post
06-25-18, 03:47 PM
#
6
Rilgamon
Premium Member
Join Date: Sep 2009
Posts: 822
do-end-blocks create a scope, too. This way you can change the outer testVar.
Lua Code:
function
testFunc
(
)
do
local
testVar
=
testVar
;
print
(
testVar
)
;
end
testVar
=
2
;
end
__________________
The cataclysm broke the world ... and the pandas could not fix it!
Rilgamon
View Public Profile
Send a private message to Rilgamon
Find More Posts by Rilgamon