karlis Posted May 24, 2011 Share Posted May 24, 2011 everything that is variable and is not local is stored in _G Link to comment
qaisjp Posted May 24, 2011 Author Share Posted May 24, 2011 So testmanny = "hi" outputChatBox(_G("testmanny")) would output "hi" to chatbox? but local pfft = "hi" outputChatBox(_G("pfft")) wouldn't? Link to comment
karlis Posted May 24, 2011 Share Posted May 24, 2011 no, they still will show, if the local value exsists at the moment _G is called EDIT AGAIN:seems that local values rnt stored indeed. number1=1 string="string" local number2=2 local string2="string" for k,v in pairs(_G) do if type(v)~="table" and type(v)~="function" then print(k..":"..v) end end --[[this returned: string:string number1:1 _VERSION:Lua 5.1 ]] Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now