MantisBT - Core Inform
|View Issue Details|
|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|
|Target Version||Fixed in Version||6L02|
|Effect||(cosmetic) Error message is badly worded|
|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.|
|2011-01-10 00:23||ChrisC||New Issue|
|2011-01-10 11:12||jmcgrew||Status||new => confirmed|
|2011-10-15 07:38||graham||Note Added: 0001375|
|2011-10-15 07:38||graham||Status||confirmed => resolved|
|2011-10-15 07:38||graham||Resolution||open => fixed|
|2011-10-15 07:38||graham||Assigned To||=> graham|
|2014-05-07 07:34||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:34||jmcgrew||Status||resolved => closed|