Load and Save data in Squiffy

I have a question. Can anyone provide a code to save and load data? For example:

I have the variable set to:
@set goal = 5
Save to the computer

goal = 0
Load from the computer
@goal = 5
Variable loaded

What do you mean by "save to the computer"?

Do you mean so the player can save their progress in a game? Attributes are saved to LocalStorage as soon as they are set, and loaded from LocalStorage every time you use them.

Just in case if a user accidentally restarts the program.

I think the question as I read it is, can you save the data to a common store.... So you have game 1 and game 2. presumably it would be cool to have a storage place, Lets say.. a "File" we will call "Game Progress." that you could store thngs in, that both game 1 and then laer game 2,3,4,5 can all access the vars so as you write the "modules" your have the same character in the series. Something like that.

Now if you can declare a "global" so like @set g_charstr (using the naming convention) or @setGlobal "

Log in to post a reply.