How do I add new items to my saving json file?

0 favourites
  • 3 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • Hello!

    I have an android game and I use a JSON file to store the info.

    This is the system

    This is how it looks inside

    I'm working on an update and I need to expland the json with more items, imagine I want to add "Unlock5, 6, 7..." etc.

    But I'm not sure on how to do do it, since people who has already a saved state, has the old variable. How could I expand it for users who udpate the app?

    Thank you!

  • You will have to cook up a system that checks for that. Something like: Go through all keys that should be there and if it isn't, add it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You will have to cook up a system that checks for that. Something like: Go through all keys that should be there and if it isn't, add it.

    Sorry for the delay! Yes, I thought it was it, however I cannot make it work :( I canno t find the way to add a new key while keeping the existing ones.

    I've tried with new object, set path, set json...

    I was trying stuff like this but it doesn't work -.-

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)