Posted 20 June 2013 - 05:40 PM
Hello,
I am a bit confused as to the output i get when running this code:
I would expect the output to be a list going 1 2 3 4 5. But instead i get a list like: 1 3 2 5 4.
I was hoping someone could explain why it does this and also how to prevent it.
Thanks
I am a bit confused as to the output i get when running this code:
table={
["a"]="1",
["b"]="2",
["c"]="3",
["d"]="4",
["e"]="5"}
for k,v in pairs(table) do
print(v)
end
I would expect the output to be a list going 1 2 3 4 5. But instead i get a list like: 1 3 2 5 4.
I was hoping someone could explain why it does this and also how to prevent it.
Thanks