How to convert number to Float?
#3

float() should actually do it. How did you use it?

If you use the value inside a calculation, you do not really need to convert it yourself. The compiler will do it for you if you use it like this (for example):

Код:
new Float:some_float = PlayerInfo[playerid][Logic] * 55.0;
The compiler will convert Logic to Float automatically if the other value (55.0 in this case) is a Float already.
Otherwise use float(PlayerInfo[playerid][Logic]) instead.
Reply


Messages In This Thread
How to convert number to Float? - by MichiCZ - 12.04.2019, 17:58
Re: How to convert number to Float? - by BigETI - 12.04.2019, 18:06
Re: How to convert number to Float? - by NaS - 12.04.2019, 18:10
Re: How to convert number to Float? - by MichiCZ - 12.04.2019, 18:12

Forum Jump:


Users browsing this thread: 1 Guest(s)