|View Issue Details [ Jump to Notes ] ||[ Issue History ] [ Print ] |
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000501||Core Inform||Phrases and functional programming||public||2011-01-10 00:23||2014-05-07 07:34|
|Reporter||Fuchsia tude|| |
|Assigned To||graham|| |
|Product Version||6G60|| |
|Target Version||Fixed in Version||6L02|| |
|Summary||0000501: Unhelpful error message when Python-style phrases are indented|
|Description||I like keeping logic relating to an object indented below its definition. If a room contains an object containing an object with its own code or similar situations, it can get indented several tab stops over.|
The sample code below produces an error message suggesting that "the tabs here seem to be misaligned", but that's not actually what seems to be tripping up NI. In fact, the problem is that the first line of the phrase block is indented to tab level 1 rather than 0, and so the second line is at tab level 2 rather than 1 as Inform 7 seems to require. I don't believe this requirement is mentioned anywhere in the docs.
In fact, I7 doesn't care what tab level the "Before" line has whatsoever; but every line subsequent has a preordained tab level.
I'd either make the Python-style indentation requirements relative to each previous line, rather than absolute, or make it clear that their absolute position is immutable in the error message and documentation (mainly page 11.7, I believe).
|Minimal Source Text To Reproduce|
The East Bay is east from the West Bay.
Before going in the East Bay:
if the player had been holding something:
say "Not so fast!" instead.
|Tags||No tags attached.|
|Effect||(cosmetic) Error message is badly worded|