I have a global variable "Number" as 0, and object "Button"
SO, every time "Button" is touched, then 0,01 is added to "Number".
-->
On Touched "Button" --> Add 0,01 to Number
Problem occurs when i touch "Button" after 5th time, then this happens:
Number = 0 --> 0,01 --> 0,02, --> 0,03 --> 0,04 --> 0,05 --> 0.060000000000000005 --> 0,07 --> ...
Problem occurs with 5th addition, it gives me 18 numbers after decimal point.
Can anyone help me with understanding why this happens, and how to prevent it?
Idea in the game is to compare two numbers. First function gives me number with two numbers after decimal point (floor(random(1,10000))/100), and i have to get equal number with touching "Button". But this problem prevents to achieve my goal