Help with disabling cardinal directions

I’ve just started with Inform (well, a few weeks ago, really) and have started trying to write a (simple) adventure. Basically, it’s about 3 rooms, but I want to disable cardinal directions.

This is my code:

A room can be cardinal or uncardinal. A room is usually uncardinal. A direction can be cardinal or normal. A direction is usually not normal. North, northeast, east, southeast, south, southwest, west and northwest are cardinal.
Before going in a cardinal direction when the location is uncardinal, say “Who knows what your bearings are. You certainly don’t have a compass. Try something else.”

The compiler likes the code and compiles it just great. Until you try to play.

When I type ‘east’ (there’s an east connection to another room), it lets you go east.

I looked up the chapter on directions, and it didn’t really help me. Everything appears to work great in their source-code, just not mine. Can somebody please help me? :confused:

Thanks,

Pe-ads

Just remove the word “in” from the before rule and it should work fine. Also, you need the word “instead” at the end, or the action will just continue after printing the message.

Before going cardinal direction when the location is uncardinal: say "Who knows what your bearings are. You certainly don't have a compass. Try something else." instead.
(I’ve solved this previously with a slightly different approach: nitku.net/if/escapade/source_12.html).

Thanks a lot! It works perfectly now.