Here's a weird thing

I defined a ghost as a person and placed it in a room called the Hallway. But when I abstract myself to the hallway and “look,” the ghost is described as being on the stairway between the hallway and the floor below.

Specificqlly, I wrote:

The ghost is a person. The ghost is in the Hallway.

How much clearer can I make my instruction before Inform places the ghost in the hallway?

That’s a perfectly good way to do it. Could you post some more of your code?

The ghost is a person. The ghost is in Hallway.

The ghost counter is initially zero.
Every turn:
if the ghost counter is two:
end the story saying “It touched you. You have died.”;
otherwise if the ghost is in the location:
increment the ghost counter;
now the ghost counter is zero.

Look in the World tab of the Index window. Where is the ghost listed? (This will indicate whether Inform is putting it in the wrong location when interpreting the source text, or if it’s getting moved during play.)

I’ll do that. Thanks.

According to the World tab, the ghost starts out in the stairway, not the Hallway as I instructed Inform (see above). I’m at a loss.

can’t you isolate the code where that is happening? I don’t see any stairway in the code you posted.

you could also search for ghost to see where it might go wrong…

There’s a fairly extensive physical layout, with a stairway connecting two floors of a house. I am wondering if the counter is being misinterpreted by Inform as a movement counter, instead of just a turn counter as I intended.

Try starting a new sketch project with just the stairs, the hallway and the ghost. and their related code…

Did you by any chance give the stairway a name with “hallway” in it, like “hallway stairs”? Sometimes giving things names that overlap can confuse Inform, because it thinks you’re using “hallway” as a short name for the door. So this code:

Hallway Stairs is a room. Hallway is a room. The ghost is a person. The ghost is in Hallway.

places the ghost in the Hallway Stairs, not the Hallway as you’d expect.

To elaborate a bit: if you name a thing “The twisted battered knife,” Inform will allow you to keep referring to it in the source code as “the knife” so you don’t have to keep typing the whole thing out. But sometimes Inform guesses wrong about whether you’re using one of these abbreviated names. I think the general idea is that it usually guesses the thing that’s first in the source code order.

…and yes, this is confusing whenever you run into it.

good guess :laughing:

The stairs were created when I told Inform there was a stairway between Foyer (first floor) and Hallway (second floor).

I had thought a turn counter created for the ghost may have been causing problems, but I deleted it, and the ghost still ended up in the Hallway. I’m stumped.

Here is the code that created the stairway:

A staircase is a kind of door. A staircase is usually open. A staircase is seldom openable.

The left staircase is above Foyer. The left staircase is below Hall.

What exactly did you say to define the stairs?

Well, I finally figured it out, sort of: I created the stairway twice. I have solved the problem now.
Thanks to all who tried to help.