Problems creating one- and two-way connections between rooms in a maze

I thought I understood how Inform creates connections between rooms, but I’ve been getting some error messages that don’t make any sense and I’m not sure what to do with. I’m trying to create a maze where the player gets lost in a garage. The idea I had is that each room has one direction that leads to the next room, while any other direction leads the player back to one of three interconnected rooms at the beginning (the Garage, Crdc 1, and Crdc 2).

This is my code:

The Mud Room is a room. The player is in the Mud Room.

A Cr is a kind of room. [It has printed name "Amidst the Clutter".] It has description "Massive aisles of clutter stretch out in all directions. You're unsure where to go."

The Garage is east of the Mud Room. ["It is cluttered, of course. What did you expect?"] "Massive aisles of clutter stretch out to the east and north."
Crdc 1 is a Cr. Crdc 2 is a Cr.
Cr 1 is a Cr. It is east of the Garage. Crdc 2 is north, east, and southwest of Cr 1. Crdc 1 is southeast, northwest, and west of Cr 1. The Garage is northeast of Cr 1.
Cr 2 is a Cr. It is south of Cr 1. Crdc 2 is northeast, east, and southwest of Cr 2. Crdc 1 is north, south, and northwest of Cr 2. The Garage is southeast of Cr 2.
Cr 3 is a Cr. It is west of Cr 2. Crdc 2 is south and east of Cr 3. Crdc 1 is west, southeast and northwest of Cr 3. The Garage is north and southwest of Cr 3.
Cr 4 is a Cr. It is northeast of Cr 3. Crdc 2 is south, east, and southwest of Cr 4. Crdc 1 is northwest and northeast of Cr 4. The Garage is southeast and west of Cr 4.
Cr 5 is a Cr. It is north of Cr 4. Crdc 2 is southwest and north of Cr 5. Crdc 1 is east, northwest, and northeast of Cr 5. The Garage is west and south of Cr 5.
Cr 6 is a Cr. It is southeast of Cr 5. Crdc 2 is north, east, and southwest of Cr 6. Crdc 1 is northeast, southeast, and south of Cr 6. The Garage is northwest of Cr 6.
Cr 7 is a Cr. It is west of Cr 6. Crdc 2 is northeast, west, and southwest of Cr 7. Crdc 1 is east and south of Cr 7. The Garage is northwest and southeast of Cr 7.
The Outside World is north of Cr 7.

Crdc 1 is north of the Garage. The Garage is north, southwest, southeast, and northwest of Crdc 1.
Crdc 2 is east, west, northeast, and south of Crdc 1. Crdc 1 is north, southeast, northwest, and west of Crdc 2. The Garage is south, southwest, northeast, and east of Crdc 2.

Instead of dropping something in a Cr, say "You cannot bear to add to the clutter."

And these are the errors I’ve gotten:

Problem. You wrote ‘Crdc 2 is east, west, northeast, and south of Crdc 1’ (line 17), but in another sentence ‘It is east of the Garage’ (line 7): but this looks like a contradiction, which might be because I have misunderstood what was meant to be the subject of one or both of those sentences.


Problem. You wrote ‘The Garage is south, southwest, northeast, and east of Crdc 2’ (line 17), but in another sentence ‘Crdc 1 is east, northwest, and northeast of Cr 5’ (line 11): again, this looks like a contradiction.

Neither of those errors seem contradictory to me, and I don’t understand what I’ve done to cause them. Interestingly, deleting the second-to-last paragraph (“Crdc 2 is east…“) gives no errors and appears to create connections between Crdc 1 and Crdc, even though the deleted paragraph is the only one that specifies any.

Thanks for any help!

1 Like

I get the impression that the syntax ROOM is {multiple directions} from ROOM does not super duper work correctly. I tried The Garage is east, south, and southwest of the Mud Room. by itself, and got a map where the Garage is east and southwest of the Mud Room, but also east and north of itself.

However,

The Garage is east of the Mud Room.
The Garage is south of the Mud Room.
The Garage is southwest of the Mud Room.

has the intended effect. So you might just have to express all of your connections in single-direction sentences.

3 Likes

That works perfectly, thank you so much!