Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L61029

Bad defaults on YesOrNo()
Submitted by: Paul O'Brian, Andrew Plotkin     Appeared in: Library 6/10 or before     Fixed in: Library 6/11
Problem

Using the YesOrNo() function consecutively, garbage input results in the "Please answer yes or no.>" prompt being repeated until a valid "yes" or "no" is entered.

However, if one types "no" at the first prompt, then just presses Enter at the second prompt, the game treats this as if "no" was entered and moves on to the next question.

Solution

To get YesOrNo() to repeat the question, add a condition around the 3 existing lines in verblibm.h

  if (parse->1) {  ! condition added
      i=parse-->1;
      if (i==YES1__WD or YES2__WD or YES3__WD) rtrue;
      if (i==NO1__WD or NO2__WD or NO3__WD) rfalse;
  }   ! end of condition.

The condition should be (parse->1) for Z-code, and (parse-->0) for glulx.


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.