06.09.2016, 21:48
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)
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)