Save & Restore

How do I code something as simple as Save or Restore? I can’t find any references that have examples.

You haven’t said which authoring system, but since your other posts were about Inform 7, I’ll assume that. The good news is that you don’t need to do anything: save and restore functionality comes for free (as is the case in nearly all authoring systems).

Note that the game tab in the Inform 7 front-end doesn’t provide a working save/restore, as it wouldn’t make sense here: a save file is a complete snapshot of the internal state of the game, so save files aren’t compatible across different versions of the same game. If you click the ‘Release’ button and run the resulting Z-code or Glulx game file in one of the many interpreters, you’ll find save and restore should work fine.

Based on your other posts, it looks like you’re using Inform 7. The built - in “Saving the game” action translates directly into an i6 action for saving. I think the actual saving / restoring mechanism is handled by the interpreter. What specifically are you trying to do? If you’re just trying to change the message printed when saving the game, that should be relatively easy. Trying to do something like have the game automatically create save points will be more difficult.