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:
https://media.discordapp.net/attachments/389868451725967360/438706601483042816/unknown.png

1 Answer

0 votes
by (63.7k 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.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...