Webstorage problems on HTML5 compile

Get help using Construct 2

Post » Wed Nov 06, 2013 11:20 pm

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!



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
B
6
S
2
Posts: 23
Reputation: 712

Post » Thu Nov 07, 2013 1:37 pm

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"flibble2013-11-07 13:40:12
B
6
S
2
Posts: 23
Reputation: 712


Return to How do I....?

Who is online

Users browsing this forum: biasaur, Unconnected and 9 guests