Please help my problem.
JaeKhan
Member, PRO Posts: 33
in Help Wanted
Hi, I have a problem whilst I'm making a game..
I used Timer behavior for my score attribute.
Every 0.1 seconds, Score = Score + 0.1
But the problem is, it works well at the beginning but later, it shows up like
66.666666666 or 78.99999999999
and I really want this to be fixed..
I will very appreciate with any helps!
Thank you for reading this post.
Comments
I would change it to every 0.1 seconds, score = score +1. then when displaying the score, display score/10
or use the roundto function to round it to 1 decimal point.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I have never used roundto function and I do not know what it exactly is nor how it works..
can you please give me a clear example how to use roundto function?
by the way, thank you very much for your help! I tried your first solution and it works perfectly.. very thanks!