1 2 3 4 5 6 7 8 9 10 11 12 13 14
function print_table(foo, bar) for k, v in pairs(foo) do print(bar .. k, v) if type(v) == 'table' and bar .. k ~= '_G' then print_table(v, bar .. k .. '.') end end end print_table(_G, '') print(getmetatable('').__index) print(string)