I'm making side scrolling shooting game. Which consists 10+ levels..i want to resume it when the game opened again. So i want to store the level variable in local storage..but when triggered it changes "NaN". Below is the screenshot.
The above image is the level unlocker. Where lev is instance variable. "Levell" is global variable...whenever we finish the level..the "Levell" gets updated
The above is local storage codes.The layout names are [1,2,3...] numbers. so at end of each layout it gets update. The first level works. But, when going to second level. The "levell" variable sets to "Nan" and restart the same coming.
Please help me!!!!