I have a table inside a table and I’m trying to index both of its places in each table,… so eventually I can remove it. The child table that I call group returns the proper index number, but the parent table returns nil. Please help.
[lua]drawTable = {}
group = {}
function label(obj)
print( table.indexOf(drawTable, obj) )
print( table.indexOf(drawTable[1], obj) )
end
drawTable[#drawTable+1] = group
drawTable[#drawTable][#group+1] = display.newRect(50,50,50,50)
drawTable[#drawTable][#group+1] = display.newRect(50,50,50,50)
label( drawTable[#drawTable][2] )[/lua]