I7: An odd error message

I wanted to try my hand at simple – or so I thought – pathing. I’ve managed a roughly similar effect before, but this time, something unexpected occurred.

[code]Pursuit relates one person to a person. The verb to follow (he follows, they follow, it is following) implies the pursuit relation.

After player going when a person (called companion) follows the player and the companion is in the room gone from:
let previous be an object;
let previous be the room gone from;
try the companion going best route from previous to the location.

Pursuing is an action applying to one thing. Understand “follow [someone]” as pursuing.

Check actor pursuing when the noun is the actor: stop the action.
Check player pursuing when the noun is the player: say “You can’t follow yourself.” instead.
Check pursuing when the player is following the noun: say “You’re already following [the noun].” instead.

Carry out actor pursuing: now the actor follows the noun.

Report pursuing: say “You decide to follow [the noun] for a bit.”

The wabe is a room.[/code]

The code results in the following error message:

As far as I can tell, it’s not a matter of accidentally using reserved keywords. Is there an obvious error I’ve made and overlooked, or is this a bug?

I’m not sure exactly why the compiler barfs, but this does compile:

After player going when a person (called companion) follows the player and the companion is in the room gone from: let previous be an object; let previous be the room gone from; let way be the best route from previous to the location; try the companion going way.

UPDATE: Well, it looks to me that you’re running into the action variables for going. From the standard rules:

The going action has a room called the room gone from (matched as "from"). The going action has an object called the room gone to (matched as "to").

So the compiler may be trying to process it as “try the companion going best route [a direction] from previous [the room gone from] to the location [the room gone to]”; which is not what you want, though I’m not at all sure why it’s zeroing in on “previous” as the problem. Though “previous” isn’t type-guaranteed to be a room, so that might be an issue.