Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- globals.lua
- -- show all global variables
- local seen={}
- function dump(t,i)
- seen[t]=true
- local s={}
- local n=0
- for k in pairs(t) do
- n=n+1 s[n]=k
- end
- table.sort(s)
- for k,v in ipairs(s) do
- print(i,v)
- v=t[v]
- if type(v)=="table" and not seen[v] then
- dump(v,i.."\t")
- end
- end
- end
- dump(_G,"")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement