Local Storage "(Loading...)" & other issues

0 favourites
  • 3 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • I'm trying to make a clicker mobile game. I bought this template from the Scirra Store and I'm going through it trying to understand it and modify it.

    I tried to change one of the key names on the local storage and for some reason that key is no longer working (The other keys are still working though). All I did was change the name. I've been through the entire event sheet to make sure the key name is consistent and as far as I can see it should work.

    That's not even the problem now anyway... Local storage is completely broken now. In the debugger it just says "(Loading...)" Screenshot One second it was working, then I toggled an action disabled and it's completely broken. I undid the toggle, tried clearing storage and restarting C2 but it's still broken. I had the same problem when I tried to implement the code into another project.

    It seams once it's broken there's no fixing it...?

    Please help me. I need to fix these issues and better understand local storage because it's a huge part of this project. Maybe there's an alternative to local storage? Any advice is greatly appreciated! Thanks!

  • Try adding "Local Storage -> Clear" action on start of layout. Run the game once, then disable this action.

    If this doesn't help, then there must be some mistake in the code. Please post screenshots of all events where local storage is used.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the response dop2000 . I tried clearing it before and it didn't work. I went back to the original template and started again, being more careful this time, and I think it's working now. I think somehow I missed an action in the code so the key name wasn't consistent.

    I have run into another problem now though... When I clear the storage, that key just says "NaN" and doesn't work. I think it's because there's no value being set. So I have to set the value to make it work. I don't know why this would happen though, the code was working perfectly before and all I did was change the name.

    I don't want to post any screenshots because it's a bought template and it wouldn't be fair on the author to post it publicly. If I need more help (which I'm sure I will) I'll PM screenshots if that's ok. Thanks again!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)