Add two table cell values not working-HELP!

Hey all! While using the Gamesalad PC editor, I'm trying to add two table cell values and save them to another cell using the Change Table Value function. I have defined the column as an integer, but when I add the two cells via tableCellValue(game.tblPlayers,1,7)+tableCellValue(game.tblPlayers,1,8), the result is 5060 instead of 110, which should be the result of 50+60. The column I'm trying to save to is also an integer...

It seems like Gamesalad is still treating the values as text or am I missing something here?

Thanks for the help!

Comments

  • zolnier@hotmail.comzolnier@hotmail.com Member, PRO Posts: 25

    This table was created via importing a CSV if that helps... I just tried that on a table I created manually and it worked... What gives?

  • zolnier@hotmail.comzolnier@hotmail.com Member, PRO Posts: 25

    Well, one way that I solved it was

    (tableCellValue(game.tblPlayers,1,7)1)+(tableCellValue(game.tblPlayers,1,8)1)

    which gave me the correct output... I guess there is something about default behavior on an imported table that is causing this addition error...

  • zolnier@hotmail.comzolnier@hotmail.com Member, PRO Posts: 25

    that should be an asterisk before the 1 in each part...

Sign In or Register to comment.