Help about strval and float
#1

About this line :
pawn Код:
if( strcmp( key , "VehicleLocX1", true ) == 0) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVlocx1] = strval( val );}
So basically, [pVlocx1] is used to store the X location of a car, and I store it in a .ini file as a float.
But when the script tried to pull information on the .ini file, it actually converts it into an integer with strval.
That's why my script in https://sampforum.blast.hk/showthread.php?tid=177075 crashes.

The question is, can I change this "strval" into a function that turns "val" into a float? Tried using float(val) but then it shows argument type mismatch on the pawno.


Any help would be appreciated, thanks.
Reply


Messages In This Thread
Help about strval and float - by Diagram - 18.09.2010, 07:12
Re: Help about strval and float - by Ash. - 18.09.2010, 07:49
Re: Help about strval and float - by Diagram - 18.09.2010, 08:09
Re: Help about strval and float - by Double-O-Seven - 18.09.2010, 08:17
Re: Help about strval and float - by Diagram - 18.09.2010, 08:36

Forum Jump:


Users browsing this thread: 1 Guest(s)