Trying to get this command to work:
<<if $secret eq true $playerScore += 18>>
Well done you have discovered the secret<</if>>
I get the
Error: <<if>>: bad conditional expression in <<if>> clause: unexpected token: identifier
trying to do too much with it. Maybe I should separate them?
Nested sub-conditional expressions need to be conjoined with logical-AND (
&&) or loginal-OR (
||). In this case, however, it seems as though you’re attempting to increment
$playerScore, which you do not want to do as part of the conditional test but rather as a separate
<<set $playerScore += 18>>Well done you have discovered the secret<</if>>
Here are a couple examples of how you’d conjoin sub-conditional expressions:
<<if $hasRedCard and $hasBlueCard>>
Has both red and blue cards.
<<if $lockpick >= 10 or $hasSkeletonKey>>
Has either 10+ lockpick skill or a skeleton key.
Excellent advice this has helped with the issue greatly. Thanks.