NaN O.o

Get help using Construct 2

Post » Sun Sep 01, 2013 6:02 pm

Hello i am trying to make Rounds when player click play game add 1 to rounds and save it, problem is when i try it on my pc he work perfect and when i upload it in Scirra he say Rounds: NaN what can do for fix this?
Aldo Tankuu2013-09-01 18:04:49
B
13
S
6
Posts: 107
Reputation: 2,181

Post » Mon Sep 02, 2013 5:53 am

NaN stands for 'Not a Number'

If it's something that works on preview, but breaks on export it could be a bug.

But it sounds like it could be fixed anyway..
I don't know your context exactly but I think rounds is being set to a string from however your saving it.
Can you convert it to an Integer when the value is retrieved? using Int(value)
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Sep 02, 2013 10:50 am

but why when i test in my PC work perfect and when upload dont work?
B
13
S
6
Posts: 107
Reputation: 2,181

Post » Mon Sep 02, 2013 2:35 pm

Not a number , seems like you are trying to set an int variable to a string , Try to convert the string to an int before setting it to a variable

Int(Text.Text)
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,481

Post » Mon Sep 02, 2013 2:41 pm

@Whiteclaws where to put Int(Text.Text) ?
B
13
S
6
Posts: 107
Reputation: 2,181

Post » Mon Sep 02, 2013 4:52 pm

Could I get a snappy or your capx ?

That would help us a lot to find the reason of the problem


B
42
S
17
G
17
Posts: 2,247
Reputation: 17,481

Post » Mon Sep 02, 2013 4:53 pm

i find when to use it but when i upload again in Scirra says again NaNAldo Tankuu2013-09-02 16:53:51
B
13
S
6
Posts: 107
Reputation: 2,181


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 8 guests