don't want disambiguating to self

The code below is to implement “ANSWER DOOR” – but the problem is, a typo gives the response "(to yourself.) My regular disambiguation doesn’t work.

[code]“Just answer” by Andrew

rule for clarifying the parser’s choice when answering that:
say “X.”;

room 1 is a room.

the red door is a thing in room 1.

the phone is a thing in room 1.

answering is an action applying to one thing.

understand the command “answer [something]” as something new.

understand “answer [something]” as answering.

carry out answering:
say “You’ll want to do something else with the [noun] instead.”;
the rule succeeds.

the block answering rule is not listed in any rulebook.

check answering something that:
say “While it’s possible you want to answer a door or phone, you should be ASKING people ABOUT things, instead. P.S. sorry for the (to yourself) bit.”

test typo with “answer dooor”

What can I do to eliminate the (to yourself) message? Clarifying the parser’s choice, which usually works, doesn’t here.


The line

understand the command “answer [something]” as something new.

…should not be legal. That declaration only applies to single verb words, not grammar lines.

If you change it to

understand the command “answer” as something new.

…you’ll eliminate the disambiguation, but also wipe out the normal “answer” action. Is that what you wanted?

If not: what you’re running into is not disambiguation, but clarification. The command parses as “answer dfdf (topic) to me (creature)”, and since you left off the last phrase, the parser fills it in and reports that. (This happens even in a one-line game; it has nothing to do with your additional answering grammar.)

As you note, the “clarifying” activity doesn’t apply to this case. I don’t recall offhand where in the parser labyrinth this message sprouts from.

EDIT-ADD: Now that I look, the PrintInferredCommand() is pretty straightforward. You could hack on it if you want to get down to the I6 level.

Thanks! This isn’t a huge nuisance, but it’s good to have the disambiguation, and knowing which function to tweak helps me know where to start, as an i6 novice. I’ve found it in parser.i6t so now I just need to look at other command samples I’ve been given to see how to tweak it and write things into my code.