Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001142Core InformAssertions and creationspublic2013-10-18 13:502014-05-07 07:33
Assigned Tograham 
PlatformOSOS Version
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0001142: "The player has a property" always refers to the default player character, even if the player is really someone else
DescriptionNormally, Inform does not allow adding new properties to things referenced via variables, but "the player" is apparently treated as a special case, so that "The player has a property" works.

However, this special treatment is apparently handled by treating "the player" as synonymous with "yourself", the default player character. This is not correct if "the player" is actually someone else. In particular, the example source code below fails to compile, giving the following error message:

"Problem. You wrote 'The mood of the player is sad': but the property mood for the Joe is not allowed to exist, because you haven't said it is."

Replacing "The player has a mood" with "Joe has a mood" avoids the error.
Minimal Source Text To Reproduce
There is a room.
Joe is a person. The player is Joe.
A mood is a kind of value. The moods are happy and sad.
The player has a mood. The mood of the player is sad.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
ChrisC (reporter)
2013-10-19 16:41

Possibly related to 0000638?
vyznev (reporter)
2013-10-20 09:53
edited on: 2013-10-20 10:10

Vaguely, but the cause is clearly different. Setting the player's identity at the beginning of the source code avoids 0000638, but this bug is still triggered.

(Conversely, setting the player's identity only at the end of the source makes the example code here compile, but only because it triggers 0000638, so that the mood is added and set for the default player character, not for Joe.)

graham (administrator)
2014-05-04 08:08

Surprisingly, it's a duplicate of 0000638; fixed.

- Issue History
Date Modified Username Field Change
2013-10-18 13:50 vyznev New Issue
2013-10-19 16:41 ChrisC Note Added: 0002145
2013-10-20 09:53 vyznev Note Added: 0002146
2013-10-20 09:54 vyznev Note Edited: 0002146 View Revisions
2013-10-20 10:10 vyznev Note Edited: 0002146 View Revisions
2013-10-30 13:18 EmacsUser Severity mild => serious
2013-10-30 13:18 EmacsUser Status new => confirmed
2013-10-30 13:18 EmacsUser Steps to Reproduce Updated View Revisions
2014-05-04 08:08 graham Note Added: 0002657
2014-05-04 08:08 graham Status confirmed => resolved
2014-05-04 08:08 graham Resolution open => fixed
2014-05-04 08:08 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker