system halt when there is other attribute in expression of tableCellValue

zellhuangzellhuang Member, PRO Posts: 79
Hi GSers, thx for checking my problem!

I have creat 2 tables, one is called PlayerStatus the other one is called SystemInfo. Plus, i alse created 2 global attributes called Number1 and ActingPlayer, both of them are real.
In my game, i have to use the rule with expression just as "tableCellValue(PlayerStatus,2,tablecCellValue(SystemInfo,4,1))" or "tableCellValue(PlayerStatus,2,ActingPlayer+1). You see, in the expression of tableCellValue, whenever I use attribute in the place of row or column,the system will halt.

Does anybody know how to fix it? Is my expression wrong?
Thank you in advance!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    It's possible that calling a tableCellValue from within a tableCellValue is causing the problem. Try changing or constraining an attribute to tableCellValue(SystemInfo,4,1) and then using that attribute in place of it in the expression you mentioned.

    Are all of the attributes in those two expressions selected (and highlighted in blue) from the expression editor? If not, or if you typed them in, try selecting them again from the expression editor. If you can post a screenshot of your rules, it may help speed a resolution to this issue.
  • zellhuangzellhuang Member, PRO Posts: 79
    @tatiang hi,dude,thx for your help! here is the screenshot.
    < img src="http://m1.img.libdd.com/farm4/2013/0108/18/12D6987E015B70D529325363F4A3B909A890D45CDA014_697_128.PNG">

    I tried your methods before, but it couldn't solve the problem :( Do u have any other idea?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I agree with @tatiang route the info to a self attribute first and then pull it from there. It works.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Are you 100% sure that the column that is designated by tableCellValue(SystemInfo,4,1) always exists? If tableCellValue(SystemInfo,4,1) is ever smaller than 1 or larger than the number of columns in game.Player Status Real, then it will crash your game.

    You can use DisplayText actors to debug this by watching the values as they change in your game.
Sign In or Register to comment.