summaryrefslogtreecommitdiffstats
path: root/resources/script/test.lua
blob: 1dc1fc40c2e0d9e3e5236344c24d8c3ca8c40037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local 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(getmetatable(_G))
--setmetatable(_G, {})
--print_table(_G, '')

print(bar)
print(getmetatable(bar))

--print(getmetatable('').bar)
--getmetatable('').bar = 'bar'
--print(getmetatable('').bar)