My highscore stays at zero or NaN

Get help using Construct 2

Post » Wed Jan 28, 2015 2:08 pm

plz help me I can't solve this problem.my problem is that I set a highscore system but it doesn't work,it's says either NaN or stays at 0.plz help
Banned User
B
7
S
1
Posts: 47
Reputation: 545

Post » Wed Jan 28, 2015 3:48 pm

tictoctic wrote:plz help me I can't solve this problem.my problem is that I set a highscore system but it doesn't work,it's says either NaN or stays at 0.plz help


Your problem says: "NaN", so, this means isn't a number....post your capx, you can solve this to change the value in "numeric", and if you try to set your number value from a text, you have to use FLOAT
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Wed Jan 28, 2015 3:50 pm

Scores are typically integers, so you want int(...)
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Wed Jan 28, 2015 4:16 pm

Okay guys thx for replying but when I put int it stays at zero,and when I remove int it become NaN.plz help and reply again
Banned User
B
7
S
1
Posts: 47
Reputation: 545

Post » Wed Jan 28, 2015 4:18 pm

You'll have to post what you are doing.
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Wed Jan 28, 2015 4:22 pm

you mean post a capx?
Banned User
B
7
S
1
Posts: 47
Reputation: 545

Post » Wed Jan 28, 2015 4:43 pm

Yes
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Wed Jan 28, 2015 4:54 pm

Here is an example,what am i doing wrong?plz tell me.
You do not have the required permissions to view the files attached to this post.
Banned User
B
7
S
1
Posts: 47
Reputation: 545

Post » Wed Jan 28, 2015 5:06 pm

:) case: your save has a lowercase 's' in HighScore.

Store the name in a variable and use that so this can't happen again.
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Wed Jan 28, 2015 5:29 pm

I am sorry I didn't understand.Can you fix and post the fixed capx please?
Banned User
B
7
S
1
Posts: 47
Reputation: 545

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, ChesVCF, OBLIVION, shinkan, Solomon, yiuyiu6666 and 23 guests