I have a player object, $player, and a description array $strength. I am trying to return the player's strength description by putting in the player's strength score as below.
/* My Variables */
<<set $player.str = 2>>
<<set $strength = ["Frail", "Weak", "Average", "Strong"]>>
/* Line I Am Trying To Print */
$strength[$player.str]
However, the output I get is:
Frail, Weak, Average, Strong[2]
It appears that it can't parse the object $player.str correctly inside the array. I tried setting a temporary variable $temp = $player.str, and then when I called the strength array with the $temp variable it worked:
/* My Variables */
<<set $player.str = 2>>
<<set $strength = ["Frail", "Weak", "Average", "Strong"]>>
/* Using Temporary Variable */
<<set $temp = $player.str>>
$strength[$temp]
My output was:
Average
How would I go about printing my message with my $player.str variable?