no request to disambiguate. Why not? (adv3Lite)

Edit—Answer to my questions is, parser only asks for disambiguation if the items have a disambigName defined.


I have two chairs in the room, both of them have chair as their vocab name.

[code]+ leatherChair: Platform, Fixture ‘chair;upholstered leather’
“Luxurious black leather covers the large office chair that sits behind the
desk. <.p>”

canSitOnMe = true

dobjFor(SitIn) asDobjFor(SitOn)

;

  • directorsChair: Platform, Fixture ‘chair;director's’
    “A chrome and canvas director’s chair is placed directly in front of the
    desk. <.p>”

    canSitOnMe = true

    dobjFor(SitIn) asDobjFor(SitOn)
    ;[/code]

When I enter sit in chair on the command line, I expected the game to ask which chair?

Instead, I am placed arbitrarily in the director’s chair.

Both objects are defined the same, and I can select which chair to sit in if I enter a fully qualified name.

I was expecting some disambiguation code to kick in, but it never did. Why not?

Jerry

The reason you don’t get a disambiguation message is that you’ve given the two chairs identical names, so the parser regards them as indistinguishable. With that set up there’s no way the parser could ask a meaningful disambiguation question: it would simply come out as “Which do you mean, the chair or the chair?”

If you defined the chairs thus (with different names):

+ leatherChair: Platform, Fixture 'upholstered leather chair;'
    "Luxurious black leather covers the large office chair that sits behind the
    desk. <.p>"
    
    canSitOnMe = true
    
    dobjFor(SitIn) asDobjFor(SitOn)
;
+ directorsChair: Platform, Fixture 'director\'s chair;'
    "A chrome and canvas director's chair is placed directly in front of the
    desk. <.p>"
    
    canSitOnMe = true

    dobjFor(SitIn) asDobjFor(SitOn)
;

You would then indeed get a disambiguation prompt in response to SIT ON CHAIR.