local a = {d = 1}
local b = {d = 2}
local test = {}
test[b] = true
test[a] = true
newtest = {
d = 1,
c = 2
}
for i in ipairs(test) do
print(i.d)
end
for k, v in pairs(newtest) do
print(k, v)
end
**so why the print of test is in order but the newtest is not every time?
test
has no array elements, soipairs
returns an empty iterator. – Nicol Bolaspairs
doesn't iterate in order – DarkWiiPlayer