I created an array in the file section of my game via right click-> create file and filled it up with the data I wanted to. I managed to get AJAX to fetch it and put it into an array to be used in-game.
I want the next time the player loads game to be able to access updated Array
(has completed this level, has found bonus coin in this level etc..)
so I attempted to download JSON file every time I complete a level or find and item but it results in "GAME_ARRAY.JSON", "GAME_ARRAY(1).JSON", "GAME_ARRAY(2).JSON", "GAME_ARRAY(3).JSON", "GAME_ARRAY(4).JSON"... AJAX does not seem to be able to find these downloaded array file and effectively progress is erased for every run of the game and the player would have to do a perfect run every time if they want to finish. At least that's how it seems when testing the game.
I don't want to have to export and publish the game only to find the player is unable to save progress for each run.
What do I do?