Difference between 100 and 100.0 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Difference between 100 and 100.0 (
/showthread.php?tid=450559)
Difference between 100 and 100.0 -
Blackazur - 13.07.2013
What is the diffrence between 100 and 100.0 at SetPlayerHealth for example?
Re: Difference between 100 and 100.0 -
Konstantinos - 13.07.2013
None.
Re: Difference between 100 and 100.0 -
ikey07 - 13.07.2013
health is a float, so you should use 100.0 for correct usage.
Re: Difference between 100 and 100.0 -
Ballu Miaa - 13.07.2013
In real there is no difference but in programming 100 is called an Integer and 100.00 is called a Float. What ikey and Zeus said are right. There are two types of numbers in the programming world : integer , float.
Re: Difference between 100 and 100.0 -
Konstantinos - 13.07.2013
There's not difference at all. Whenever you declare it as a Float and you use "100", it's meant to be 100.0
No matter if "100" would be readable as integer.
Re: Difference between 100 and 100.0 -
Pottus - 13.07.2013
I'd rather write it 100.0 makes more sense and is easy to identify even though it makes no difference to the compiler.
Re: Difference between 100 and 100.0 -
Vince - 13.07.2013
For good practice, just put 100.0. I believe there's a section somewhere in the documentation that handles this case. I'll see if I can find it.