re-hi,
i return to the forum because the code given by ojnab work very well but when i attempt to use it in my game i have an error.
i explain, i have a virgin table like this
local p.disposition={ {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, }
next i have this function who give to me special value and modify the virgin table
group.sortTable=function() for a = 1, #group.choose do for b=1, #group.choose[a] do table.insert(p.disposition,group.choose[a][b].textQuantityChoose.count) end end end
and i attempt to have a table like this :
local p.disposition = { {2, 6}, {3, 6}, {4, 6}, {5, 6}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}, }
Next i would modify my table like ojnab explained and i do :
e.rearrange=function() for a=1, #p.disposition do p.disposition[a][1] = a end for i=1, #p.disposition do for j=1, #p.disposition[i] do paper[j]:setFrame( i ) end end end --sorry for the ident i have no my vim with me....
to attempt to have :
local p.disposition = { {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 8}, {6, 8}, {7, 8}, {8, 8}, {9, 8}, }
But i have an error on my table “attempt to reach a number”
I suppose that the problem is with my function group.sortTable=function() who modify the structure of the table…
but i don’t see how to format my table in an another way…
if I am unclear called me I try to explain better