Hi guys, I just went through an area and I got this message:
All I did was create this item by saying ‘Dashing Suit is a kind of suit’ and then put it on the player, then I walked through a few areas, and suddenly that happened. It only ever seems to happen in this one random room, but I don’t know why.
I think we’ll need a tad more information. When are you using “person condition 2”? Is there something in the suit or this room that triggers it? What is the code for that room? Is there any special code for, or involving, the suit?
It looks vaguely as though you’re trying to manipulate the property “person condition 2” of a noun, and somehow Inform has decided the noun is Dashing Suit - which appears not to have that property.
My guess is, you have a say line with something like “[person condition 2 of the noun]” in it, as Peter implies.
Note that, per Writing with Inform 4.10 the only way you get something called “person condition 2” is by saying something like this:
A person can be awake, dozing, or asleep. A person can be happy, neutral, or sad.
Inform needs a name for these properties–if you don’t give them names it calls the first one “person condition” and the second “person condition 2.” You can give them better names explicity:
A person can be awake, dozing, or asleep (this is its wakefulness property). A person can be happy, neutral, or sad (this is its emotion property).
This doesn’t explain what’s going on with the Dashing Suit though, since surely you aren’t trying to set “person condition 2” of anything manually. My guess is that you’re doing something with a rule that sets an adjective that you’ve defined to apply to people, but the rule is grabbing the suit and trying to set it, which leads to an error. Compare this:
[code]Lab is a room. A person can be happy, sad, or neutral (this is its emotion property). The player wears a Dashing Suit.
Carry out dropping something: now the noun is sad.
Test me with “remove suit/drop suit”.[/code]
When you “drop suit” you get a similar P10 because you’re trying to make the suit sad, and “sad” is an emotion and only people can have the emotion property.
The best thing to do is type “rules” and then see which rule it says is running when you get the P10 message. That might tell you where you’re setting something that applies only to people.
Sorry, I was checking the whole of my source for ‘person condition 2’ to be sure, but I’m absolutely certain there is no “person condition 2” unless it means an emotion like Matt says. As far as I can tell, the only thing odd about that one room is that it contains a long mirror that checks for the player wearing hats. I got rid of this bit temporally and the error stopped happening. As far as I can tell there are no variables attached to the suit. Does that help?
The easiest way to debug this type of issue is to take a copy of your program, remove pieces of it, until you’re left with the smallest possible code sample that still gives you the same error message. After that’s done, and if the solution is still not obvious, post that simplified example to the forum, and odds are it’ll receive a quick reply.
Yeah, the thing is that you don’t have to explicitly define “person condition 2”; as long as you have two declarations that give properties to people then the second one will be called “person condition 2.” And if you try to check one for the suit then you’ll get a P10 even though the suit doesn’t have any properties attached (in fact, because the suit doesn’t have any properties attached).
What does the code for the mirror look like? Also, if you type “showme yourself” what does it yield?
It’s non so much a mirror as a description with [if the player wears a hat] in it. On its own it works fine as a little bit of flavour, but when that suit goes through it it bugs. It doesn’t do it for anything else I’ve tested, so I’m completely baffled. Hats are a kind of thing if that helps.
I’m afraid at this point I wouldn’t know where to begin with stripping stuff out, it’s a big bunch of files now and it could even be an extension that’s doing it somehow.
It would really help if you would actually post the code, though. Even if you don’t think it’s possible there might be something happening there that one of us could detect.
“Person Condition 2” kind of stuff happens when you don’t name values, right? Code like “A person can be angry or happy” or “A person can be brunette, redhaired, blond, or bald” ?
As far as script goes, I don’t know what to give you except “hat is a kind of thing” “dashing hat is a kind of hat for the creation and a text substitution running” “[if the player wears a hat]” There really isn’t much else attached to them and I’m not calling values in any of that.
I second the call to issue ‘rules’ in the game and see where the game is when it faults with the P10. It’ll be the rule displayed just prior to the fault message being displayed.
I think the ‘person condition 2’ may be tripping you up here. As mentioned in a previous post that pattern will likely not appear in your code since that is inform’s pattern for naming a property when no name was explicitly given. It was also mentioned how to provide names for any such properties (this is its X property).
Explicit is better than implicit so it’s best to give names to any anonymous properties, kinds of value, and rules. At least then the P10 will report the specific property at issue and it will be easier to root out the cause.
You could try using an internal name:
DashingSuit is a kind of suit.
The printed name is "Dashing Suit". [if it is used directly in the story]
Understand "Dashing Suit" as DashingSuit. [if the player needs to refer to it]
I second Matt’s call
You can quote just the paragraphs with the relevant lines (can you make a one page story with them which shows the problem?)