Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000501Core InformPhrases and functional programmingpublic2011-01-10 00:232014-05-07 07:34
ReporterChrisC 
Assigned Tograham 
PrioritynormalSeveritycosmeticReproducibilityalways
StatusclosedResolutionfixed 
Platformx64OSWindowsOS Version7
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000501: Unhelpful error message when Python-style phrases are indented
DescriptionI 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.
TagsNo tags attached.
Effect(cosmetic) Error message is badly worded
Attached Files

- Relationships

-  Notes
(0001375)
graham (administrator)
2011-10-15 07:38

A problem message now makes it clearer that a rule has to start on the left margin.

- Issue History
Date Modified Username Field Change
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


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker