I came across this beautiful tidbit of code:
http://omnigeek.robmiracle.com/2012/02/23/need-to-save-your-game-data-in-corona-sdk-check-out-this-little-bit-of-code/
And I want to use this in the game I’m developing. However, I’m a little unsure on how to implement this.
I’m using Director, so the best place to put the save/load functions would be the Main.lua (I think) and then call these functions upon entering the first scene (main menu).
However, I’m not quite sure how I could make it so it saves the default options first, but loads user options if those exist.
Essentially, I want to to check if there’s a file saved, if not, save the default one, if it does exist, load that file.
Can I check if that file exists? [import]uid: 200198 topic_id: 36198 reply_id: 336198[/import]