[the actor] undefind, but [noun] [second noun] are

I have the following:

"TestSayTable" by Mirth

Blarghing is an action applying to one visible thing.  Understand "blargh [something]" as blarghing.

Report blarghing:
	Say "[The actor] blarghs [the noun]."
The Test Hall is a room.  The player is in the Test Hall.  The description of the player is "[The noun] [the second noun]."

It compiles. If I have this:

The description of the player is "[The actor]."

compilation fails with:

Why would I even do this? In my IF, I have a decent number of NPCs. The actions they perform are essentially the same, but I’ve been storing the report text in a table. So far this has worked, except for the above hiccup. Why is [actor] not defined by [noun] and [second noun] are? Any good workarounds?

Well, the following is a fix I came up with:

To decide which person is the actor:
  Decide on the actor part of the current action.

Not sure what sort of evil that will bring out though, as I’m overriding whatever the “[the actor]” that was defined in the standard rules was (is it a say command, an global variable, a decide rule?).

The direct answer to your question is that “actor” is a scoped variable of the action-processing rulebook, but “noun” and “second noun” are global variables. This is a historical inconsistency. Logically all three should be scoped, but there’s all this legacy code (and design) that assumes that the nouns are global variables, so it hasn’t been practical to convert it all.

I would recommend against redefining “actor” as a function, which is what you’ve done. It may interfere with the existing use of “actor” in the library. I’d invent a new name instead:

To decide which person is the current-actor: […]

Now, let’s back up. I’m not sure why the description of the player needs to vary for what you’re doing. You have NPCs performing actions, okay. You have responses in a table. But why do the responses refer to the description of the player? It sounds like the identity of the player isn’t changing.

Isn’t “the person asked” a global variable that stores the actor of the current action, or am I mixed up?

That’s a way to get at the I6 “actor” variable, but I don’t think that’s always the same as the I7 concept of the current actor.