savedata, getsavedata

savedata, getsavedata

To save game data between plays can you save the data to the player's browser. This is done using the built in functions:

VERY IMPORTANT: For both functions you must assign the return value to a var even if you don't intent to use it. This is just the way it is for the syntax processor.

var s=savedata("score",99) var r=getsavedata("highscore")

Internally, SCL maps your key to your game so you do not require a game prefix on your key.