Webstorage problems on HTML5 compile

0 favourites
  • 2 posts
From the Asset Store
Jump on the mole rats and see how far you can go!
  • Hi,

    I was about to publish my first game attempt in the arcade and came upon the following problem that I can't understand.

    On compiling to android it runs and plays fine.

    On Running in the C2 debugger or running it normally in IE, Firefox or chrome it works fine.

    If however I compile as HTML5 and run try and play it, it all works fine except for the scoreboard where it freezes.

    There's not much in there to go wrong (couple of buttons/text and a background pic so I disabled bits one at a time and the problem is the saving of the high-scores itself - using the Webstorage object.

    It's taken from one of the (v helpful) tutorials and I can't for the life of me see the problem, it's like there's an infinite loop hiding in there and I just cant see it!

    I'll include a pic of the offending code snippet that ruins it all:

    Any help appreciated!

    <img src="https://dl.dropboxusercontent.com/u/201483942/Help.jpg" border="0" />

    P.S. I had to do scoring arrays level by level as I couldn't get C2 to sort any other X axis but the top one.

    Cheers all.

    KevD

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Minor update, removing the bits of code one by one revealed the bit I've now highlighted in green to be the bit of code that freezes the game after compiling for HTML5 website.

    Remove it and it all works - except the high-score table which works fine in android/debug etc..

    Tried it on a different PC and the same occurs too :(

    Edit to mention:

    "HIGHSCORE" is a Global text variable = "0,100,300,400,1000"

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