17 lines
444 B
Lua
17 lines
444 B
Lua
function blockgame.stringify (tab)
|
|
if type(tab) == "table" then
|
|
local result = "{ "
|
|
for key, value in pairs(tab) do
|
|
result = result .. key .. ": " .. blockgame.stringify(value) .. ", "
|
|
end
|
|
return result .. "}"
|
|
elseif type(tab) == "function" then
|
|
return "<function>"
|
|
elseif type(tab) == "boolean" then
|
|
if tab then return "true" else return "false" end
|
|
elseif type(tab) == "nil" then
|
|
return "nil"
|
|
else
|
|
return tab
|
|
end
|
|
end
|