function getTableData(obj)
elseif t == "boolean" then
lua = lua .. tostring(obj)
elseif t == "function" then
lua = lua .. tostring(obj)
elseif t == "string" then
lua = lua .. string.format("%q", obj)
for k, v in pairs(obj) do
lua = lua .. "[" .. getTableData(k) .. "]=" .. getTableData(v) .. ",\n"
local metatable = getmetatable(obj)
if metatable ~= nil and type(metatable.__index) == "table" then
for k, v in pairs(metatable.__index) do
lua = lua .. "[" .. getTableData(k) .. "]=" .. getTableData(v) .. ",\n"
elseif t == "userdata" then
local metatable = getmetatable(obj)
if metatable ~= nil and type(metatable.__index) == "table" then
for k, v in pairs(metatable.__index) do
if not ExceptKey[k] and not type(v) ~= "userdata" then
lua = lua .. "[" .. getTableData(k) .. "]=" .. getTableData(v) .. ",\n"