|Anonymous | Login | Signup for a new account||2018-03-19 18:57 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000474||Core Inform||Rules and rulebooks||public||2010-12-18 19:11||2014-05-07 07:35|
|Platform||x86||OS||Mac OS X||OS Version||10.5|
|Target Version||Fixed in Version||6L02|
|Summary||0000474: Unhelpful error message when using if statement incorrectly|
|Description||If you use an if statement wrongly, you get an error message that leads you on a wild goose chase. The problem is not that you are trying to assign a value to anything, it's that the if statement cannot be used alone. |
A better error message would be something like: "You wrote 'If player is in Kitchen, say "Hi."' : but it looks like you are trying to create a rule or enforce a condition without declaring a rule in a way that I understand. You can use rule verbs like before, instead, or after; alternately, you can create a rule within a rulebook."
Problem. You wrote 'If player is in Kitchen, say "Hi."' : but this seems to give something a name which contains double-quoted text, which is not allowed. If you do need quotes in a name, one option would be to write something like 'In the Saloon is 'Black' Jacques Bernoulli.'; but this problem message is often caused by an accident in punctuation, in which case you never intended to create an object - you thought that the text ended a sentence because it finished with sentence-ending punctuation, when in fact it didn't, so that I read the next words as following on.
|Minimal Source Text To Reproduce|
"test" Kitchen is a room. If player is in Kitchen, say "Hi."
|Tags||No tags attached.|
|Effect||(cosmetic) Error message is badly worded|
This sentence, however, is legal:
If DVD is in the Library.
and creates an object (Lindsay Anderson's movie, presumably) and a room, putting one in the other. The problem with the source text was not that a sentence began with "if", it was the problem reported by Inform.
It's arguable that we should leave things as they are, but I've added a footnote to problem messages like this one in cases where control structures appear in assertion sentences known to be erroneous:
>--> The way this sentence starts makes me think it might have been intended as part of a rule rather than being a statement about the the way things are at the beginning of play. For example, 'If the player is in the Penalty Zone, say "An alarm sounds." is not allowed: it has to be put in the form of a rule showing Inform what circumstances apply - for example 'Every turn: if the player is in the Penalty Zone, say "An alarm sounds."
|2010-12-18 19:11||Poster||New Issue|
|2010-12-19 00:02||jmcgrew||Relationship added||related to 0000451|
|2010-12-19 00:03||jmcgrew||Status||new => confirmed|
|2010-12-19 00:04||jmcgrew||Relationship added||child of 0000475|
|2010-12-19 00:04||jmcgrew||Relationship deleted||child of 0000475|
|2010-12-19 00:04||jmcgrew||Relationship added||related to 0000475|
|2011-10-16 07:02||graham||Note Added: 0001395|
|2011-10-16 07:02||graham||Status||confirmed => resolved|
|2011-10-16 07:02||graham||Resolution||open => fixed|
|2011-10-16 07:02||graham||Assigned To||=> graham|
|2014-04-14 11:07||EmacsUser||Relationship added||has duplicate 0001220|
|2014-05-07 07:34||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:35||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|