tbc loop change part 3

This commit is contained in:
Manuel Simon Hirsig
2017-06-02 19:51:28 +02:00
parent d4b089d508
commit 4c5a7f2a75
9 changed files with 39 additions and 40 deletions
+3 -3
View File
@@ -13,10 +13,10 @@ function format_value(v)
end
function print_table(t, depth)
for i = 1, getn(t) do
print_pair(i, t[i], depth)
for i, v in ipairs(t) do
print_pair(i, v, depth)
end
for k, v in t do
for k, v in pairs(t) do
if type(k) ~= 'number' or k < 1 or k > getn(t) then
print_pair(k, v, depth)
end