Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function readTable(t)
- local s = "{"
- for k, v in pairs(t) do
- if type(k) == "string" then
- s = s .. tostring(k) .. " = "
- end
- if type(v) == "string" then
- s = s .. "\"" .. tostring(v) .. "\"" .. ", "
- elseif type(v) == "number" or type(v) == "boolean" then
- s = s .. tostring(v) .. ", "
- elseif type(v) == "table" then
- s = s .. readTable(v) .. ", "
- end
- end
- s = s .. "\"end\"}"
- return s
- end
Advertisement
Add Comment
Please, Sign In to add comment