Add new code snippets

This commit is contained in:
2024-03-03 13:50:12 +01:00
commit 01b612a50b
409 changed files with 65292 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
local function printTable(table, n)
if not n then n = 0 end
for k,v in pairs(table) do
local printText = ""
for i = 1, n do
printText = printText .. " "
end
printText = printText .. "[" .. k .. "] = " .. tostring(v)
print(printText)
if type(v) == "table" then
n = n + 1
printTable(v, n)
end
end
end