Dialog: disambiguation issue regarding doors

I’m posting this here because the main dialog thread is now so long. I’ve come across an issue with disambiguation.

The code below demonstrates it:

(current player #player)
(#player is #in #room)

#room
(room *)
(name *)        hallway
(look *)
        Nothing to see.
(from * go #east through #washdoor to #washroom)
(from * go #west through #gardendoor to #garden)

#washdoor
(door *)
(name *)        washroom door
(descr *)
        A very dull door.

#gardendoor
(door *)
(name *)        garden door
(descr *)
        A door to the garden.

#washroom
(room *)
(name *)        washroom
(look *)
        An interior room.
(from * go #west through #washdoor to #room)

#garden
(room *)
(name *)        garden
(look *)
        A beautiful garden.
(from * go #east through #gardendoor to #room)

If you x door you get (as expected) a disambiguation message. If you answer washroom, however, you get a further disambiguation prompt:

> x door
Did you want to examine the washroom door to the east or the garden door to the west?

> washroom
Did you want to:
1. examine the washroom door to the east, or
2. examine the washroom door to the east?
(Type the corresponding number)

It’s not clear to me why washroom is being regarded as ambiguous in this context (and in fact I don’t think it does think it’s ambiguous: it’s choosing between [examine #washdoor] and [examine #washdoor].

3 Likes

Thanks for reporting this! I have limited internet connectivity at the moment, but this was intriguing enough that I just had to dig deeper. It’s a compiler bug. I can’t make a proper release right now, but if you are building from source you can try the following fix yourself: In frontend.c, line 1234 (yes, really), change if 0 to if 1. Hopefully that shouldn’t break anything else, but I’ll need to get home and run a bunch of test cases before I can be reasonably sure.

4 Likes

This is now fixed in Release 0g/03.

1 Like