Exit command help

I need help creating an exit command so that the player can exit a room by just typing “exit”.

I think that (at least in Inform 6M62) this will happen automatically so long as the outside direction is defined. That is, if you have this:

House is a room. Sidewalk is outside from House.

then typing “exit” in House will convert the exiting action to the action of going outside.

If you already have a direction defined, you can still define the connection as “outside” as well:

House is a room. Sidewalk is north of House. Sidewalk is outside from House.

This also allows the player to go “in” from Sidewalk back to House, which is probably fine. But if you have the same room that’s outside from more than one other room, you can define a one-way map connection as in §3.3 of the documentation:

Apartment 2A is a room. Apartment 2B is a room. Hallway is north of apartment 2A and south of apartment 2B. Hallway is outside from apartment 2A. Hallway is outside from apartment 2B. Inside from Hallway is nowhere. 

Instead of going Inside in Hallway: say "You'll have to say whether to go south to apartment 2A or north to apartment 2B."

For that last message, we have to use going “in” rather than going “from” because the map connection is nonexistent; see §7.13 of the documentation.