locate row using 2 cell values

i need a function to identify the row number using the x and y values in this table

Comments

  • 3absh3absh Member Posts: 601

    i also need to avoid any errors if the x and y values aren't in the table

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I would use a Loop over Table for column 1 and then a rule that says

    When tableCellValue(table,self.index,1)=[target X value] AND tableCellValue(table,self.index,2)=[target Y value]
         Change Attribute self.foundInRow to self.index

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • 3absh3absh Member Posts: 601

    Is it possible to use tableSearch in this case?
    I really want to know how the tableSearch function works

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Sure... the problem with tableSearch is that it only finds the FIRST matching result. So you'll still need a loop. :(

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.