access to global variables in lua
snippet in lua

access to global variables in lua

user1742

a, b = 1, 10
if a<b then
    local a = 12
    print(a) -- Will print 12
    print(_ENV.a) -- Will print 1
end
print(a, b) -- Will print 1 10