If statements in Inform 7

Hi all,

I'm trying to figure out if statements in Inform 7 and am running into errors. Here's some sample code.
The Hallway is east of the Bedroom.
"This is the main hallway that connects your room to the rest of the house. Framed pictures of your family are hung on the walls. Your bedroom is through a door to the west, and a storage room is to the east. The hallway continues to the north, or you can head to the living room to the south."
Storage Room is east of the Hallway.
Instead of going east from the Hallway:
If the player holds the backpack;
Say "Now that you have your backpack, you 're ready to enter!";
Now the player is in Storage Room.
Otherwise:
Say "You don't want to go in there without your backpack.";

I get a weird error message that I can't fully understand. It says "the punctuation here ':' makes me think this should be a definition of a phrase and it doesn't begin as it should, with either 'To' (e.g. 'To flood the riverplain:'), 'Definition:', a name for a rule (e.g. 'This is the devilishly cunning rule:'), 'At' plus a time (e.g. 'At 11:12 PM:' or 'At the time when the clock chimes') or the name of a rulebook, possibly followed by some description of the action or value to apply to (e.g. 'Instead of taking something:' or 'Every turn:')."

Is there something wrong with the syntax of this? If I remove the if statement, the game compiles just fine.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Chris via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : stewie via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : stewie via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Chris via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Chris via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Chris via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector

Reply via email to