Tables question - checking for a value in a row
jiffw
Member Posts: 42
Is there an easy way to check if a value exist within a row in a table?
Basically the user enters a value and I need to check if the value entered matches any of the values in 1 particular row with 6 columns.
The only way i can think of doing this is checking each column individually [i.e. if x = tableCellValue( game.Table 1 ,row,1) AND x = tableCellValue( game.Table 1 ,row,2) AND x = tableCellValue( game.Table 1 ,row,3) etc...]. But this seems very long winded so I was hoping someone could suggest a more elegant alternative.
Thanks
Basically the user enters a value and I need to check if the value entered matches any of the values in 1 particular row with 6 columns.
The only way i can think of doing this is checking each column individually [i.e. if x = tableCellValue( game.Table 1 ,row,1) AND x = tableCellValue( game.Table 1 ,row,2) AND x = tableCellValue( game.Table 1 ,row,3) etc...]. But this seems very long winded so I was hoping someone could suggest a more elegant alternative.
Thanks
Comments
http://gshelper.com/shop/gamesalad-templates/table-word-checker-loop-behavior-demo/
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Have a look at this thread for some ideas
http://forums.gamesalad.com/discussion/54922/hyperloops-loop-to-your-hearts-content