ComputerCraft/printTable.lua
2022-06-30 11:05:14 +02:00

15 lines
340 B
Lua

local function _printTable(table, s, tabs)
for key, value in pairs(table) do
if type(value) == "table" then
_printTable(table, "", tabs + 1)
else
print(string.rep(' ', tabs), key, value)
end
end
return s
end
function printTable(table)
return _printTable(table, "", 0)
end