Extra Save Blocks (HTML5 Save Fix)

rob1221

  • *
  • Posts: 9473
The default save and load blocks work fine almost all the time, but there is a problem for HTML5 games for websites that don't keep the same file name for uploaded builds (like Newgrounds).  To work around this problem I created the attached scene behavior with two global custom blocks.  They work like the normal save/load blocks except they have an extra path parameter.  This allows the default path (the file name) to be replaced by something more consistent.

If you want to use these blocks for already published games, make sure you use the normal loading block as a backup if there is no saved data for the new path (which there won't be at first).

Note: you must be logged in to see attachments.

Alternative solution for subscribers using b10430 or higher
Refer to this topic: http://community.stencyl.com/index.php/topic,59276.0.html

Update 1: Fixed compilation error for public build b10300.
Update 2: Fixed another public build compilation error.  Non-HTML5 platforms will now use the default save/load blocks.

« Last Edit: April 05, 2020, 02:51:33 pm by rob1221 »

Where do I find the path?

rob1221

  • *
  • Posts: 9473
You can enter anything in the block as long as you use the same text for loading/saving and don't change it after the game is published.