Skip to content

Instantly share code, notes, and snippets.

@Aedda
Last active October 12, 2023 03:55
Show Gist options
  • Save Aedda/f7ce73e567636a3b7c90 to your computer and use it in GitHub Desktop.
Save Aedda/f7ce73e567636a3b7c90 to your computer and use it in GitHub Desktop.
Lua Table Dump
function dumpTable(table, depth)
if (depth > 200) then
print("Error: Depth > 200 in dumpTable()")
return
end
for k,v in pairs(table) do
if (type(v) == "table") then
print(string.rep(" ", depth)..k..":")
dumpTable(v, depth+1)
else
print(string.rep(" ", depth)..k..": ",v)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment