Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000138Core InformAssertions and creationspublic2010-06-28 08:362010-10-28 00:30
Assigned Tograham 
Platformx86OSMac OS XOS Version10.6
Product Version6E59 
Target VersionFixed in Version6F95 
Summary0000138: Object names starting with a reserved name are allowed but can't be used in phrases
DescriptionThe compiler allows to create objects that start with reserved words like "every", "each", "no" etc but they can't be used in phrases. Doing so will result in an error message that basically says that the compiler is confused but it doesn't know why. If you don't use the objects directly in phrases, there are no errors and the game compiles normally with the object keeping its name. The creation of such objects should be disallowed to avoid confusion.
Minimal Source Text To Reproduce
The kitchen is a room. The player carries no tea.

Every turn:
	if the player carries no tea, say "You still don't have any tea."

[remove the every turn rule and the game compiles.]
Additional InformationThis is the error message produced:

Problem. You wrote 'if the player carries no tea, say "You still don't have any tea."' : but this sentence seems to contain a value which makes no sense, and I'm unfortunately not able to say why not. I can only suggest staring at it for a while.
I was trying to match this phrase:

if (player carries no tea - a condition) , (say "You still don't have any tea." - a phrase)
This was what I found out:

player carries no tea = a condition
say "You still don't have any tea." = an instruction to do something
TagsNo tags attached.
Effect(mild) Compiler accepts invalid code
Attached Files

- Relationships

-  Notes
EmacsUser (manager)
2010-06-28 13:16

Confirmed, though the statement ``they can't be used in phrases'' is a bit imprecise. Changing the every turn rule to:

Every turn:
if the player carries tea, say "You still don't have any tea."

works because Inform thinks ``tea'' is a short name for ``no tea.''
graham (administrator)
2010-09-26 10:47

I have compromised by improving the problem message so that there's rather more of a clue what the trouble is. I don't really want to go down the road of prohibiting many forms of wording in names because there are potentially quite a few ambiguities - this is what "called" is for; to be used when there seems to be an unfortunate clash.

- Issue History
Date Modified Username Field Change
2010-06-28 08:36 Juhana New Issue
2010-06-28 09:39 jmcgrew Status new => acknowledged
2010-06-28 13:16 EmacsUser Note Added: 0000167
2010-06-28 13:16 EmacsUser Status acknowledged => confirmed
2010-09-26 10:47 graham Note Added: 0000594
2010-09-26 10:47 graham Status confirmed => resolved
2010-09-26 10:47 graham Resolution open => fixed
2010-09-26 10:47 graham Assigned To => graham
2010-10-25 21:14 jmcgrew Fixed in Version => 6F95
2010-10-28 00:30 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker