I'm saving my variables such as player inventory, player attributes, experience table, monsters description (loot, gold drop, etc) and I'm using the AJAX plug in to load them.
I work with multiple layouts, so everytime a layout starts or is suspended/closed, I have to load/save the new infos into the arrays. I have json files for every array/dictionary and save it there.
Everything was going well, until I add the new player inventory array. I have a variable AJAX_Loading to check if everything was loaded, and exactly on this new array, it's crashing up. If I delete this, it starts working. Also, if I clean the local storage, it works, but for once only. Then, when I save it changing or suspending the layout, the next time, it won't load.
So, does anybody have any clue on what is going on here? What am I doing wrong?
Here is my code:
Thank you so much for your help! :)