MantisBT - Core Inform
View Issue Details
0000501Core InformPhrases and functional programmingpublic2011-01-10 00:232014-05-07 07:34
ChrisC 
graham 
normalcosmeticalways
closedfixed 
x64Windows7
6G60 
6L02 
(cosmetic) Error message is badly worded
0000501: Unhelpful error message when Python-style phrases are indented
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).
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.
No tags attached.
Issue History
2011-01-10 00:23ChrisCNew Issue
2011-01-10 11:12jmcgrewStatusnew => confirmed
2011-10-15 07:38grahamNote Added: 0001375
2011-10-15 07:38grahamStatusconfirmed => resolved
2011-10-15 07:38grahamResolutionopen => fixed
2011-10-15 07:38grahamAssigned To => graham
2014-05-07 07:34jmcgrewFixed in Version => 6L02
2014-05-07 07:34jmcgrewStatusresolved => closed

Notes
(0001375)
graham   
2011-10-15 07:38   
A problem message now makes it clearer that a rule has to start on the left margin.