Posts: 1,409
Threads: 376
Joined: Apr 2012
Reputation:
0
What is the diffrence between 100 and 100.0 at SetPlayerHealth for example?
Posts: 1,167
Threads: 57
Joined: Jul 2010
Reputation:
0
health is a float, so you should use 100.0 for correct usage.
Posts: 1,849
Threads: 96
Joined: Apr 2010
Reputation:
0
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.
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
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.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
I'd rather write it 100.0 makes more sense and is easy to identify even though it makes no difference to the compiler.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
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.