I have been building a game, but have run into a very annoying problem. I fill out some of my array (via the array editor), and then request it using AJAX and loading it into an array object. After that, it wasn't working, so I tried a few things and figured out that the AJAX last data held the size of the array but absolutely no data. I saved the project and refreshed C3. When I opened the project again, the array was clear! I filled out a little data and did the same thing with the same results- no data in the array. WHY?! This must be some sort of bug in Construct 3. I don't want to share my project and don't know if I can reproduce it to fill a bug report. What should I do?
Give me a Pixel
Difficult to tell if you're using it correctly, let's see the events
There is no problem retrieving the data at this point- there just is no data to retrieve. How could the problem with all the data simply vanishing into thin air be an error in my code?
There should be a json file for the array in the Project>Files folder - if you download this and open it in a text editor you can check to see what data has been saved.
If you can't see anything obvious wrong with it try sticking it into a json validator like this one: jsonformatter.curiousconcept.com
I downloaded it and loaded it into Microsoft Notepad. It looks the exact same as when I look at the AJAX last data in the debugger. Here is a screenshot:
I think it's because your z size value is set to zero - it should be 1.
I changed the depth to 1, but nothing changed.
It looks like your previous data is already lost, so changing the depth back to 1 won't retrieve it - any new data should be saved though.
Develop games in your browser. Powerful, performant & highly capable.
It seemed to have worked, thank you.