Jump to content

Need help to store and get values from localStorage..


Learning By Doing
 Share

Recommended Posts

Hello!

 

I need help to store and get values from localStorage, I did manage to save my values to localStorage, but I got some problems when running the game next time.. Maybe someone can give me some examples how I could store and then view the values next time I start the game?

 

I need help to save playerLevel, totalExp & nextLevelExp to localStorage, and then view the values and update them.

 

 

 

 

 

 

--Edited--

I did solve my problem.. I just ha to use  parseInt  when I was getting the data from localStorage..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...