Problem with "NPC, go"

This is very easy to reproduce. With the entire game source:

Cave is a room. Brad is a man in Cave. I get:

>brad, go
You'll have to say which compass direction to go in.
I didn't understand that instruction.

This seems to be related to issue 1604, but I’m not sure how to work around it, because I think that would require distinguishing the actor in a rule similar to the block vaguely going rule, and I’m not sure how to do that.

Can anyone offer any advice here?

Thanks.

I’m not sure I understand the question. What are you trying to get Brad to do such that the “you need to supply a direction” error isn’t relevant to you?

The problem is that it doesn’t just print the “you need to supply a compass direction” error, but also a second line “I didn’t understand that instruction.”

Looks like a minor bug. This should fix it.

The action processing internal rule response (K) is "[internal rule exception]"
To say internal rule exception:
	if the action name part of the current action is the going action and the person asked is not yourself:
		say "[run paragraph on]";
	else:
		say "I didn't understand that instruction."

You’re getting two layers of parsing since you are telling an NPC to do something. Brad’s tries BRAD, GO, and the bare command GO is failing the “block vaguely going rule” and the parser gives that message. Then Brad is reporting to the player that he “didn’t understand that instruction”. Not so much a bug (I see jrb has already posted a possible fix for you.)

That’s the way the parser handles NPC’s - when you give them an order, it’s almost as if the character is typing their own command into the parser.
Notice that you don’t get the extra message if the player tries it themselves:

There might be a complicated way to suppress the second message, but it’s working correctly by giving a parser refusal, then an NPC report. As a player I wouldn’t be confused by that output so it might be not worth the trouble to fix it.

I think there’s a format to customize failure messages - something like

Report Brad failing trying going: say "'You need to tell me which way to go,' Brad says"

That’s probably wrong.

No, it’s two parser errors in a row, whifh is wrong. If the second line were an NPC report, it wouldn’t say “I”. (The library never puts words in an NPC’s mouth.)

That works great, thanks.

Noted. Writing it down. Thank you!