So, today I was working on fixing a bug with my terrain generator, when I was extremely frustrated, because I couldn’t loop through a table using ipairs.
So, I had a table like this one:
local tbl = {}
tbl[25] = true
And I am looping though it like this:
for i, v in ipairs(tbl) do
print(v)
end
It doesn’t print anything in the output when I loop through the table using ipairs
but when I use pairs instead of ipairs it prints the value of v in the output (true), what is going on here? Why can’t I get it to print anything when I use ipairs but when I use pairs it prints something?
EDIT: Im going to bed as its 9:14 PM for me, so I will check back here in the morning, good night