Error money per distance
#5

An integer division rounds the result to floor.

8/1000 is 0.008, which turns into 0 (integer division > floor)

I don't know in what range you want the amount to be, but try something like: (random(15) + 1) + (distance / 2)
Reply


Messages In This Thread
Error money per distance - by AlexuTzVs - 06.09.2016, 14:32
Re: Error money per distance - by Vince - 06.09.2016, 14:49
Re: Error money per distance - by AlexuTzVs - 06.09.2016, 15:00
Re: Error money per distance - by AlexuTzVs - 06.09.2016, 20:53
Re: Error money per distance - by SickAttack - 06.09.2016, 21:48
Re: Error money per distance - by AlexuTzVs - 11.09.2016, 23:07
Re: Error money per distance - by Shinja - 12.09.2016, 11:26

Forum Jump:


Users browsing this thread: 2 Guest(s)