Now nowhere is (direction variable) of hub-room: error?


I’m using 6G95 so the solution may be “just upgrade already.”

But I found this code pretty quickly bombs out, where I have a hub room and 4 regions to the north/south/east/west that are closed off once they’re solved.

hubroom is a room.

a region has a direction called go-dir.

westregion is a region. go-dir of westregion is west.

westofhub is west of hubroom.

to solve-it (rg - a region):
    now nowhere is mapped (go-dir of rg) of hubroom;

This isn’t a huge deal, as I can just set “now nowhere is west of hubroom” manually.

But is there any syntax that would allow me to use a variable and get “now nowhere is mapped” functionality?


1 Like

The reason this doesn’t work is weirdly arcane: I believe there are in fact separate relations for “mapped north of”, “mapped northeast of”, and so on for each direction, and Inform doesn’t know how to go from a direction to its relation.

There’s a special phrase provided for this purpose, though: “change the (direction) exit of (room) to (room/nowhere)”. Since it’s a special-purpose phrase, it’s one of the few places in Inform where you still have to use the word “change” instead of “now”.

I believe the only place this shows up in the documentation is the example Prisoner’s Dilemma.


Oh man! I’m a bit embarrassed now that you mentioned that. Because I looked back in my code, and I saw examples where I used it.

The thing was – I used this, long before, for Ugly Oafs back in 2014! Not with variables as directions, but I used it all the same.

But somewhere along the line, I probably found “now X is mapped Y of Z” more memorable, and I started using that formulation, and I kept using it.

I added the line of code, and it works fine.

So I hope my question helps someone else.

Incidentally, I wrote some short I7 code and saw what auto.inf generated:

! when play begins:
      ! [1: let di be east]
[ R_849 
    t_0 ! Local variable e.g. 'di' = object
      ! phrase 1
       t_0 = I52_east; 
      ! phrase 2
      ! [2: now r1 is mapped east of r1]
      ! phrase 3
      ! [3: change the east exit of r1 to r1]
      ! phrase 4
      ! [4: change the di exit of r1 to r1]
      (Resolver_0(t_0,I88_r1,I88_r1,"source", 85));

So it’s interesting (to me) to see the different i6 syntax for “change the di exit” and “change the east exit.”

1 Like