In my game I have made a table, which then inserts values into it. The table gets created, and with item 1 it had 5 characteristic, same with item 2, 3, 4 and so on.
For example, in the first item, it's called box, it will create a table called 'boxes' and it will insert into the table 'box' which had been given 5 characteristics.
Code: Select all
function newBox(x, y)
local box = {x = x, y = y, colour = pickAColour(), width = 75, height = 75}
table.insert(boxes, box)
end
The issue arrives when further on in the script, when I try to find out the colour of the 6th box. Can anyone help me?
Any help is much appreciated
Thanks.