I want the user to be able to unlock a new level when their score reaches a certain value. I am using loadsave.lua to save the number of unlocked levels the player has. I use this code to determine if they unlocked the next level:
if score >= 30 then
myData.settings.unlockedLevels = 3
loadsave.saveTable( myData.settings, “settings.json” )
end
For my levels I am using this tutorial:
https://coronalabs.com/blog/2014/08/12/tutorial-building-a-level-selection-scene/
It works fine the first time, but when I reload the simulator it is not saved.
I load the table in my levelselect.lua:
myData.settings = loadsave.loadTable(“settings.json”)
Can anyone help me with this? Thank you.
Sincerely,
Alex