I stumbled across a somewhat puzzling behaviour in Inform 7 (6E72). The following code doesn’t compile:
[code]Chapter 1 - Kitchen
The Kitchen is a room.
Chapter 2 - Cellar
The Cellar is south and down from the Kitchen.[/code]
The problem message is
However, to make it compile, it’s sufficient to either take out just the heading “Chapter 2 - Cellar” or, while keeping the heading there, to take out either direction (south or down). The latter option, of course, results in not having both connections.
To be sure, it’s not a big deal, since I can easily say:
The Cellar is south from the Kitchen. The Cellar is down from the Kitchen.
Nevertheless, should I report this as a bug? (Also, I’m not exactly sure what the desired and canonical behaviour is.)
It’s some kind of bug, because removing a section header should not change the compilation. (Unless there’s some kind of ambiguous phrase in your code. But “Kitchen” is not ambiguous.)
I didn’t think this kind of phrasing was supported, but it clearly works (without the section header). So it’s worth reporting as sometimes not working.
The Cellar is south and down from the Kitchen.
[/code}
The Cellar winds up south of the Pantry. So it’s obviously parsing it as something like “The Cellar is south. The Cellar is down from the Kitchen.” The first half relies on a recently-mentioned room, and recently-mentioned stops being true across section headers.
So it’s definitely a phrasing to avoid – it will generally not do what you expect. You should still report it, but in the category “this did something confusing”. It may not be fixable.