I'm stuck on a tutorial by ramones. It is titled, "Arrays for Beginners".
It is an excellent tutorial, however, just when I was getting to the place that I wanted to be: json, the examples stopped working.
After searching hard, I find that the older webstorage (ramones tutorial) has now been replaced with a localstorage api. The items in the action parameters have changed. The json piece based on loading and saving isn't working for me.
I've looked at other localstorage tutorials, but haven't found one that makes the sense that ramone's does. In fact, I was FINALLY getting the idea.
Can anyone give me a hand in understanding how to complete the tutorial successfully? The manual just doesn't make things clear enough for me to understand.
Is there a way to use webstorage rather than localstorage? I don't need to save lots of data. From what I've read, many others would welcome that as an option.
Here is where I am stopped in the tutorial:
Pulling hair out and feeling disappointed...
Here you go:
https://mega.nz/#!kAxBQRTJ!ZqM9eHA0R-q4 ... lPRiPPXQFA
Look for the Enter key, and the Click on the save button action to see how to load a string. With the demo running type anything in the box, and enter or click save to make a few keys.
Rightclick will show you how to delete the keys, right click on the list to see how to delete the keys durring runtime.
Sorry it is not a custom example, but it should help you.
If you wanted to use my example to save a JSON look for where it says "Some random text I entered", you would put the Array json there, without any quotes.
Hope it works for you, you will see how to make a quick LSD system (Load Save Delete).
Remember also, you can make a "Save array" which you can load with other arrays, so you only have to save and load 1 string.
Thank you again! I just downloaded your kind help file. I will take a look right away. The tutorial that you recommended was/is excellent. Wish someone would update it for the current localstorage api. It was understandable and took me quite a ways into arrays.
No problem! here is anoother tutorial about arrays showing you a sweet trick to instantly draw a sprite matrix on the screen.:
https://www.scirra.com/tutorials/360/ge ... m-tile-map
Great if you want to make a nice level editor for a tile based game or whatever.
Develop games in your browser. Powerful, performant & highly capable.
https://mega.nz/#!8Ngi3QyZ!iAa_Zv5_wGLz ... 0SNdNWMKOM
Try hat... I think that is what you are after. added the event 17, and tweaked where he had a webstoreage save.
You need to use a local storage OnLoad condition to load the array with whatever the button requested.
Be sure to check out the manual about local storage, It really is great. Ashley goes over just about everything you will need.
sorry for the Delay :/