I’m using the following to insert an image into the 1st index of a table
table.insert(t, 1, image)
From what I read it’s supposed to enter that image into table t at the 1st position shifting all the other images in that table down…my table I has 3 images [1], [2] and [3] so when I insert the new image using the code above I should then have [1], [2], [3] and [4] but sometimes (doesn’t do it all the time) the result is [1], [2], [3] and [5]
This causes and error in my code as I’m looping though my table like so
for i=1,#t do end
I’m wondering why it skips an index randomly and what can I do to prevent this?