I was tidying up the code for my IFComp entry, and the part in question boils down to this:
[code]A jerk is a kind of man.
room 1 is a room. room 2 is north of room 1. room 3 is north of room 2. room 4 is north of room 3.
Biff is a jerk. Biff is in room 4.
Tad is a jerk. Tad is in room 3.
Dylan is a jerk. Dylan is in room 2.
Chad is a jerk. Chad is in room 1.
[if you comment out the line below, we scope properly. If not, we don’t.]
a utility player is a thing.
After deciding the scope of the player:
place room 2 in scope;
before doing something with a jerk:
if location of player is not location of noun:
say “Man, [noun]'s nowhere near. You don’t even want to think about him right now.” instead;
test ohno with “x biff/x tad/x dylan/x chad”;
In the example above, X DYLAN gives the sort of reaction I want–as long as you comment out the seemingly irrelevant “a utility player is a thing.” Otherwise, Inform fails to decide the scope.
Why did this happen? I’m baffled. And how do I check for certain keywords that might cause this sort of behavior from Inform in the future? Does “utility player” have some meaning in Inform I’m not aware of?
This sort of thing seems like it happens rarely, and in fact I’m surprised it didn’t happen sooner…but all the same, if I can avoid a silly mistake in the future, that’d be wonderful.