Issues with comparing table information with attribute value
Hi Guys,
I've encountered a strange one, and was wondering if anyone has seen and resolved similar issues.
Very simply I've got a table of shop values and have an integer attribute for players cash. All I want to do is se if the player can afford the item.
In the rule I'm saying:
attribute (player_cash) if equal or greater than "tableCellValue( game.shop , game.Whatshop ,3)"
game.shop being the name of the table
game.Whatshop being an attribute that defines which row to use (though just using any number here doesn't help)
3 being the column the item is in.
It not only doesn't display, or say "invalid_expression" it actually causes actors to change position in the scene and other completely unrelated actors, like HUD elements to not display at all.
What's even more strange is I use a very similar rule to take the money from the player and this works fine:
"game.player_cash -tableCellValue( game.shop , game.Whatshop ,3)"
help much appreciated as I can't think of another way to compare these 2 values to define if the action and be completed.
I've encountered a strange one, and was wondering if anyone has seen and resolved similar issues.
Very simply I've got a table of shop values and have an integer attribute for players cash. All I want to do is se if the player can afford the item.
In the rule I'm saying:
attribute (player_cash) if equal or greater than "tableCellValue( game.shop , game.Whatshop ,3)"
game.shop being the name of the table
game.Whatshop being an attribute that defines which row to use (though just using any number here doesn't help)
3 being the column the item is in.
It not only doesn't display, or say "invalid_expression" it actually causes actors to change position in the scene and other completely unrelated actors, like HUD elements to not display at all.
What's even more strange is I use a very similar rule to take the money from the player and this works fine:
"game.player_cash -tableCellValue( game.shop , game.Whatshop ,3)"
help much appreciated as I can't think of another way to compare these 2 values to define if the action and be completed.
Answers
I might try this in a fresh project, see if I encounter the same issue. I've already tried deleting and recreating this rule a number of times, and always with the same results.
If I encounter this in a clean, small project how would I get it over to you to take a look?