Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L61004

Disambiguation/undo conflict
Submitted by: Torbjörn Andersson     Appeared in: Library 6/10     Fixed in: Library 6/11
Problem

I looked at the Keyboard() function and noticed this:

  if ((w == UNDO1__WD or UNDO2__WD or UNDO3__WD)
    && (parse->1==1))

Usually this makes no difference since in most cases a_table *is* parse, but in some cases it isn't. One such places is when asking disambiguation questions. Consider the following transcript from Advent, where the player has just walked east into the building:

  >GET
  What do you want to get?

  >UNDO
  [Previous turn undone.]

  >GET THE
  What do you want to get?

  >UNDO
  What do you want to undo?

In the first case, 'parse' presumably holds the result from parsing GET, i.e. one word. In the second case, parse presumably holds the result from parsing GET THE, i.e. two words.

Solution

I believe what you really want to test is:

  if ((w == UNDO1__WD or UNDO2__WD or UNDO3__WD)
    && (nw==1))

The nw variable has been set to a_table->1 a few lines earlier.

As a workaround, use the bi-platform Glulx compiler (without the -G switch), where this bug has been fixed.


Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.