intfiction.org

The Interactive Fiction Community Forum
It is currently Sun May 19, 2013 12:29 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Apr 22, 2012 10:55 pm 
Offline

Joined: Fri Mar 09, 2012 3:42 pm
Posts: 62
Heya, folks. Can anyone help me track down a weird bug I'm encountering when using Deluxe Doors by Emily Short?

Consider the following code:

Code:
Include Deluxe Doors by Emily Short.

The White Room is a room. The Red Room is a room.  The White Room is east of the Red Room.

The player is in the White Room.

The creepy clown statue is a thing in the Red Room.

After deciding the scope of the player (this is the creepy clown statue always visible rule): place the creepy clown statue in scope.

If the player tries to do anything that requires the statue to be touchable (e.g., "take statue", "eat statue", etc.) while in a different room from the statue, the following error message is generated:

Code:
[** Programming error: nothing (object number 0)  has no property component_parent to read **]

After a bit of poking around in Deluxe Doors, I've managed to track the culprit down to this rule from Section 2 - Latched Doors:

Code:
Rule for reaching inside a room when the particular possession is part of an open door (called target):
   if the target is a half-door of a touchable door, allow access.

So far, so good - "particular possession" is unexpectedly being set to nothing, which explains the error message. I'm not sure why that is, but I can work around it.

Here's where it gets weird, though. The preceding example doesn't actually use any of the features of Deluxe Doors - the extension is merely present. Let's change that. To the preceding example, add the following lines:

Code:
The Red Door is an open door. The Red Door is east of the White Room. Through the Red Door is the Red Room. The brass knocker is part of the Red Door.

The White Door is an open door. The White Door is west of the Red Room. Through the White Door is the White Room.

The Red Door is a half-door of the White Door.

Now, attempting to interact with the clown statue while the player is in the White Room triggers a stack overflow. The key appears to the brass knocker - or, more generally, anything that's part of an open door in the location of the player when the player attempts to interact with an in-scope object that's not in the location of the player and not part of a door. Remove the knocker, no stack overflow.

For extra weirdness, make the brass knocker part of the White Door rather than the Red Door. This causes any attempt to interact with the clown statue while the player is in the White Room to treat the statue as accessible.

This one has me stumped. I'm sure there's a bug, but I'm not sure whether it's a bug in the extension, or a bug in I7.


Top
 Profile Send private message  
 
PostPosted: Mon Apr 23, 2012 12:36 pm 
Offline

Joined: Wed Feb 29, 2012 2:00 pm
Posts: 672
Your problem seems to be with this rule.

Code:
After deciding the scope of the player:
repeat with questionable-door running through open doors in the location begin;
if the questionable-door is a half-door of a door (called the far side): place the far side in scope;
end repeat.


For some reason, it goes round in circles checking the red door. You can see this by changing it to this.

Code:
After deciding the scope of the player:
repeat with questionable-door running through open doors in the location begin;
say "Checking [the questionable-door].";
if the questionable-door is a half-door of a door (called the far side): place the far side in scope;
end repeat.


It appears to be a problem with the extension rather than Inform 7. It could be a conflict with your scope rule.

Hope this helps.

_________________
"Will you stop breaking the fourth wall? It's costing me an absolute fortune to replace it!"


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group