• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Can't get my html5 game to save data with ini files.

M

mrjonwc

Guest
I can save the game just fine on the mobile and windows version using ini files. But when I exported the game to html5 and upload it to gamejolt I cannot save the progress, I reload the game and all progress is lost. I put the .ini file in the included files folder and yet it still isn't working. All of the code is right because it saves the game on the other modules. Is there something else I have to do different to get it to work with html5?
 

FrostyCat

Redemption Seeker
Use the developer's tools in Chrome or Firefox to scan for errors. Are there CORS, 404 or other errors in the GET request to the INI file? Do you see the file's contents somewhere in the browser's local storage, and is it reaching the per-site quota?

The HTML5 export does not use a traditional file system like native exports do. It emulates files as key-value pairs in the browser's local storage and use included files as templates. Don't assume more access than what your browser is entitled to.
 
Top