Inform - Support - Patches

About Patches  


DM4 Errata  

Issue L60706

TAKE/REMOVE messages mixed up
Submitted by: Adam Cadre     Appeared in: Library 6/7 or before     Fixed in: Library 6/10

Take is the Inform verb for taking objects off the floor; Remove is the verb for taking them out of containers. (This is not to be confused with TAKE THING vs. REMOVE THING -- I'm speaking of the names of the verbs in the source code, not the dictionary words.) Thus, it's often desirable to have two different "after" messages for each verb:

  after [;
     Take: "You reel the black cable out a bit.";
       "You pull the cable out of the input jack.";

The problem is that the unmodified library produces the following transcript:

  You reel the black cable out a bit.

  You plug the black cable into the input jack.

  You reel the black cable out a bit.

The lines producing this unfortunate behavior are found in VerbLibm.h:

  [ RemoveSub i;
    if (i has container && i hasnt open) return L__M(##Remove,1,noun);
    if (i~=second) return L__M(##Remove,2,noun);
    if (i has animate) return L__M(##Take,6,i);
    if (AttemptToTakeObject(noun)) rtrue;
    action=##Take;   if (AfterRoutines()==1) rtrue;
    action=##Remove; if (AfterRoutines()==1) rtrue;

    if (keep_silent==1) rtrue;
    return L__M(##Remove,3,noun);

Note that if there is an after routine for Take, it will override the after routine for Remove -- even though this is the Remove routine! To give Remove its proper precedence over the less specific Take, simply switch the two lines beginning with "action".

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.