User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:saved-games

(saved-games: ) → datamap

This returns a datamap containing the names of currently occupied save game slots.

Example usage:

(print (saved-games:)'s "File A") prints the name of the save file in the slot “File A”. (if: (saved-games:) contains "File A") checks if the slot “File A” is occupied.

Rationale:

For a more thorough description of the save file system, see the (save-game:) article. This macro provides a means to examine the current save files in the user's browser storage, so you can decide to print “Load game” links if a slot is occupied, or display a list of all of the occupied slots.

Details:

Each name in the datamap corresponds to an occupied slot name. The values are the file names of the files occupying the slot.

Changing the datamap does not affect the save files - it is simply information.

See also:

harlowe/saved-games.txt · Last modified: 2017/06/18 22:51 by l