Source compiles but game is still wrong, plz help k thx!

Someone please tell me why this code will compile but not activate within the game:

[code]A room can be doomed or undoomed. A room is usually undoomed.

Labyrinth is a room. It is undoomed.

instead of doing something other than going north while in Labyrinth:
if Labyrinth is undoomed:
say “You fumble about but soon hear the minotaur approaching!”;
now Labyrinth is doomed;
continue the action;
say “You tarry too long and the minotaur kills you.”;
end the game in death.[/code]

and no matter what I do, neither of those descriptions print nor do I ever die; none of the code is being read but it does compile fine.

Any help is appreciated! Thanks!

The compiler interprets this as “instead of doing anything other than going to the ‘north’ direction.” So you’re catching commands like “x north”, but nothing else.

You can get what you want by using

instead of doing something other than going while in Labyrinth:

…and then having a separate rule for the going action, which checks the direction.

(Also, remember that some player commands include multiple actions. So the doomed flag could be set and triggered in a single turn.)

Awesome! Thank you! :slight_smile:

Here’s some discussion about a way to handle the “multiple commands in one turn show the warning and get the player killed before there’s a chance to enter a different command” problem.