Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L60703

SAVE/RESTORE messages mixed up
Submitted by: Torbjörn Andersson     Appeared in: Library 6/7 or before     Fixed in: Library 6/10
Problem

On successful RESTORE, the library message for successful SAVE is printed. This is because the @restore opcode will restore the game to the point where it was saved, which was in SaveSub(). Few notice this because it's not obvious from the code and by default these two messages are the same anyway.

Solution

The following SaveSub() replacement should work:

  [ SaveSub flag;
      @save -> flag;
      switch (flag) {
       0: L__M(##Save, 1);
       1: L__M(##Save, 2);
       2: L__M(##Restore, 2);
      }
  ];

Note: This form of the @save opcode was introduced in version 5 of the Z-machine, so this will not work with earlier versions.


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.