hi…
I contact because i’ve a problem with a table in a double cycle for.
I created a table with 10 images and i tried to show those images trought a double cycle for. The problem is that the code repeat only the first 5 images.
Anyone can help me to solve this problem ?
Here the code
local button = {} local object = {} object[1] = {img = "shot.png"} object[2] = {img = "key.jpg"} object[3] = {img = "key.jpg"} object[4] = {img = "shot.png"} object[5] = {img = "shot.png"} object[6] = {img = "key.jpg"} object[7] = {img = "key.jpg"} object[8] = {img = "key.jpg"} object[9] = {img = "key.jpg"} object[10] = {img = "key.jpg"} for i = 1,5 do for a = 1,2 do button[i] = display.newImageRect( object[i].img,45,40 ) button[i].anchorX = 0.5 button[i].x = i \* 50 button[i].y = 100 + a \* 50 end end