(save-game:) suddenly stop working

Twine Version: 2.3.14
Story Format: harlowe 3.2.2

Hi guys I’ve been working on my story about almost 3 months, And (save-game:) macro and (load-game:) and all function well until recently,

when I testing my own story from beginning to a late stage of my story,(it is now has about 400 variables and still going up ), I found that somehow, the (save-game:) macro suddenly stop to work properly,

When I click the save button as usual, it appears all fine with no bug . But When I try to load such file, it 's not working, So I run some test:

1 I create a new save(name it as ‘slot c’) without been saved before, and I reload my old saves, and then try to save the new ‘sloc c’ file, but nothing happened, it is still an empty one.

2 I start a new game and try to save, the (save-game:)and (load-game:) macro all function normal again.

I still don’t know what’s the problem, all I am sure is the (save-game:) code has no bugs, it all goes well until the latter stage of my story.

Another thing is, The latter stage saves is what I did Last night, then I turn off my PC, and today, it still loadable, but within this saved file, I can’t save new ones. Is it because after a day, my save corrupted somehow?

Did any one have the same problem before?

Is that because I have too many variables, and the storage is full, so I can’t save anymore?

Thanks very much

If you’re using a non-Firefox-based browser, and you’re playing the games locally (i.e. directly on your computer) then localStorage (see here for info) where the save data is stored, is shared across all local games, thus may indeed be full.

You can download my “Local Storage Manager” if you’d like to check to see how full your localStorage is. It also lets you take the pieces of data from localStorage, save them to files, delete them, and load them from files, so that way you can manage that data a bit better.

Note that, unlike in non-Firefox-based browsers, in current Firefox-based browsers the “origin” for files on your computer is based on the path and filename, so local files won’t share localStorage space with all other files on your computer the way that other browsers, like Chrome, Edge, etc. will.

I’d start there, and if that isn’t the problem, then I’d start looking into Harlowe-based issues.

If localStorage being full is the issue, then I’d recommend you look into optimizing the amount of data you’re storing on variables in your game, since localStorage is rather limited (usually 10 MB on desktop browsers and 5 MB on mobile browsers).

Hope that helps! :slight_smile:

Hi,HiEv, You can never imagine how grateful I am right now,

Thanks for your Local Storage Manager, it is the cure,

And for a long time, I tried to find a way to save my saved files as a ‘file’ locally, that really, really, helps me a LOT !

By the way, your sample code page also helps me a lot, I once enconter a problem in twine, and I found the page from Google.

I have to say some of the functions are quite cool,

even though it is mainly for sugarcube, I still learned a lot from those sample code, and managed to use some of them into my harlowe version of story.

Again, thinks a lot, for the solution, and your Local Storage Manager.

I have decided to put this ‘Local Storage Manager’ icon next to ‘My Computer’ on my Desktop for 3 days,as a way to pay tribute to you :wink:

1 Like