0 votes
by (120 points)

I'm new to this program and rn I'm trying to allow the player to move on to the "Next Level" (A new passage) only if they've picked up a map from a battle. When I try to run this I get The "(if:) command should be assigned to a variable or attached to a hook." How can I do this?

Here's my code rn:

1 Answer

0 votes
by (68.6k points)

As the error says, you need a hook (i.e. a pair of square brackets).  In your example, your only have the (if:) and a link markup, which also uses square brackets.

Try something like the following:

(if: condition)[ [[link]]]

NOTE: The space between the hook's opening square bracket and the start of the link markup is intentional.  Twine 2's current link parser will confuse the hook and link markup if you do not include a space there and automatically create an erroneous passage.