Need help with this table loop

I am trying to find an efficient way to loop over a table and avoid repeating cell values. The below code is what I have come up with, but I am not really sure why it isn't working.

The table has 10 rows and 2 columns. The second column is used for true false values in which I will detect whether the cell has been used yet or not.


values.TBL = my table of values
game.randomNumber = value of the random row to be used
game.currentValue = the current table cell that is selected


-when touch (button) is pressed change attribute game.randomNumber to random(1,10).

-Loop until tableCellValue(values.TBL,game.randomNumber,2) = false
     (inside the loop) change game.randomNumber to random(1,10)

-(after loop) change game.currentValue to tableCellValue(values.TBL,game.randomNumber,1)

-change table value (table) values.TBL, (row) game.randowRow, (column) 2, (value) false

Comments

Sign In or Register to comment.