A surprising run-time problem with containers (solved)

This is me being a total rookie again. I promise to do better some time in the hopefully not too distant future.

Anyways, I created a closed, openable container. I’ve done this dozens of times by now so I really wasn’t expecting to run into problems with it. It translates fine, but when I open the container in game, I get a P10 Run-time problem. The error message I get is

Not everything has every property. For instance, a room cannot have the property carrying capacity: it would not mean anything. Generally speaking, the properties available to something are specified by its kind. If we say that A room has a number called maximum population. then the property maximum population is available to any room. This applies to either/or properties as well: you might say that a room is not transparent, but Inform takes the firm line that we cannot even ask, because it is meaningless for a room to be either transparent or opaque.

So, anyway, here it seems that you have tried to access a property for something not allowed to have it.

Now, I definitely didn’t try to make a room transparent, or anything even slightly exotic really. All I did was:

A wine crate is a closed, openable container in the eastern shelf. The description is "A wooden crate with some hard to make out scribbles on it, probably meant to demarcate the vintage. Right when you are about to stop examining it, you notice a subtle gleam. There seems to be a very thin wire attached to the crate." A bottle of red is inside the wine crate. It is a transparent, closed, openable container. It contains some delicious red. Description is "This bottle is cleaner and looks more welcoming than the rest." Instead of drinking delicious red: say "You are sorely tempted. But you think better of it. Best keep a clear head while in this strange place."
A tripwire is part of the wine crate. The description is "That's... unsettling." Understand "wire" as tripwire.

First I thought it might be because i put a container inside a container inside a container, but I already tried removing the wine bottle from the equation, so that one’s ruled out. I also tried removing the tripwire. What gives? Am I missing something very, very obvious?

The version of Inform I’m running is 10.1.2

2 Likes

I recreated the entire thing having to do with the shelf on a separate project file, and it works fine. There must be something somewhere else in my source that is interfering with it somehow. Ugh… I guess this is my cross to bear then, and no one else’s. Thanks for viewing, nothing to see here.

Edit: Found it! :ok_hand:

1 Like

Well, what was it? :thinking:

1 Like

In the config section of my game, I had set up an either/or property for doors that triggers when they are opened for the first time. That bit of code achieved what I wanted it to quite well, BUT i had let slip one “something” there in a tactically unfortunate spot, so when I opened something that wasn’t a door, Inform decided that the either/or should fire but that it’s impossible because the crate wasn’t a door and hence could not have a property assigned for doors, and flipped.

So shoddy programming on my part is the long and short of it – predictably. I’m glad I managed to track it down, though, and pretty fast too once I realized the code I was working on wasn’t the problem. It’s progress. :pray:

1 Like

Makes sense!

Btw Inform should already keep track of stuff like that - “if cellar door has been opened” is a condition it can handle out of the box.

(With that said I often just create new properties too since I sort of generally feel anxious when engaging with the syntax and exactly how it evaluates things)

It sure does. But I’m having descriptions and flavor texts change a bunch based on actions the player has taken, so I figured some kind and sub-kind wide preconfigurations make things go smoother. So it’s not just my nemesis, the cellar door.

1 Like