Webstorage Not Working for Me

Get help using Construct 2

Post » Thu Oct 04, 2012 12:38 am

Way of the Sax guy here again!

I followed this example...http://www.scirra.com/forum/webstorage-save-game_topic46118.html

Here is my capx http://www.wayofthesax.com/tests/wayofthesax.capx (yes, new website!). 10.3mb

A little explanation. First off, I've closed all unnecessary layouts and minimized unnecessary groups.

As you can see on the dummy layout, when you click on one of the variables (for instance..."articles", which is what we're going to work with today) it tells the system how many articles have been collected. Try this. Run the dummy layout and click "articles" 3 times. Then click "menu" at the top. You will see on the bottom left that "Article Score" says "3/8". Good. Now click the "Save" button and the new black/white save button that pops up. Hit refresh. You will be back at the dummy layout. This time just click on "menu" and the "Load" button and finally the black/white load button. Nothing happens.

My Webstorage events are in the menu event sheet at the bottom. I've double-checked the key and variable names with my global variables, in this case the "articles" global variable. I tried disabling my article score group and using the "every tick" method to set the text to the webstorage key. It doesn't work...

Any ideas?ptbcomposer2012-10-04 04:22:21
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Thu Oct 04, 2012 12:45 am

Wow, 94 meg you werent kidding :)

Sorry that download was taking a bit too long.

When I have been stumped in the past sometimes its best to isolate the issue. Get webstorage working in its simplest form (in a new project) and then impliment it into your main project again and make sure that no other variables or events are messing with it.
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Thu Oct 04, 2012 4:22 am

I removed all of the music and sound effects to get it down to 10.3mb so it's a much faster download.
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Thu Oct 04, 2012 5:17 am

Ah I see what the problem is.

In your save event you are using Key: "Asave" And Value: "articles"

It needs to be Key: "Asave" And Value: articles (no "").


I must say, your game is looking mighty impressive. Had I known I would have gladly downloaded the full thing to experience the sounds. Looking forward to a demo!
ImageImage
B
72
S
16
G
6
Posts: 1,038
Reputation: 10,448

Post » Thu Oct 04, 2012 5:37 am

Haha, I just found the same exact mistake myself. So stupid of an error to waste my time on! Thanks anyway.
B
14
S
5
G
4
Posts: 121
Reputation: 3,938


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests