NaN

Get help using Construct 2

Post » Fri Sep 13, 2013 1:14 pm

Hello,
I got one problem on my game Rounds when i test on my pc he work good and when i upload to web rounds says NaN i give you some pic from my game
ThanksCapxAldo Tankuu2013-09-13 14:37:15
B
13
S
6
Posts: 107
Reputation: 2,181

Post » Fri Sep 13, 2013 2:22 pm

Hmm the links does not seem to work for me.

Its hard to say without seeing your .capx file.

The most i can help you is that NaN = Not A Number

So somewhere in your program it is expecting a number but getting a string or something.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Fri Sep 13, 2013 2:37 pm

here is capx file http://www.solidfiles.com/d/078b442da4/
B
13
S
6
Posts: 107
Reputation: 2,181

Post » Fri Sep 13, 2013 2:50 pm

When you save something in Webstorage it is always saved as a string, so when you read it from the webstorage you have to convert it to a integer again.

so in your

On start of layout

it should be

System --> Set Lives to int(WebStorage.LocalValue("LSave"))

the int() should do the trick
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Fri Sep 13, 2013 3:19 pm

ok thanks a lot ;)
B
13
S
6
Posts: 107
Reputation: 2,181


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 9 guests