i7/extensions

Destinations can't start with a number in Transit System extension

lizzard opened this issue · 5 comments

While using Emily Short's Transit System extension, I realized that destinations defined in tables can't start with a number. One of the examples has stops (rooms) named Fifth Street, Sixth Street, etc. But this would be clunky in a bigger city where you have stops named 112th Street (which works fine as a basic room name). I'm working around it for now by coming up with an alternate way to name these stations.

Do you have any suggestions for a way to get around this and still keep the rooms that are destinations named "112th St" or "24th St"? I tried various ways of escaping, quoting, and so on, but that didn't work. Thanks!

As far as I can tell this is an Inform7 compiler bug.

Rooms (and other object names) are allowed to start with a number in inform7, but you can't reference them in a table. (as long as they aren't only a number, you can't have a room called 112, but you can have one called 112th street)

workaround:

room-112th-street is a room. The printed name is "112th Street". Understand "112th Street" as room-112th-street.

then you can refer to 112th street as room-112th-street in your table (since that's it's name).

Explanation: by default a thing's inform7 variable name is how it's printed and how it's understood, but you can add more ways of referring to a thing, and change how something is printed (either using the printed name property or changing the "printing the name of activity". This way the player can't really tell that the room is named "room-112th-street" internally, but you can refer to it that way in source code.

Inform7 has a bug tracker somewhere, you can report the compiler bug to.

Thank you very much for confirming the bug and for the workaround tip! That worked beautifully and now I can name my train stations the correct names. Whew!

I'll report it to Inform7 a bit later, am waiting for their bug tracker to send me registration confirmation.