WHY doesn't this simple float work
x = start time (60 sec for example)
y = count down from x after 10 seconds: x = 60; y = 50 (THIS WORKS, I was printing it on the server and both the numbers are ok just this fucking float doesn't do what it should) new Float:percent = float((x - y) / x) * 100.0 Just WHY is this 0.0% no matter when, it's 0.0 after 10 seconds, 0.0 after 30 seconds, 0.0 after 23957325 seconds it simply DOESN'T CHANGE |
Re: WHY doesn't this simple float work
Move the float function to the substraction:
Code:
new Float:percent = (float(x - y) / x) * 100.0 |
Re: WHY doesn't this simple float work
FINALLY, thanks
|
| All times are GMT -4. The time now is 03:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.