18.09.2010, 07:12
About this line :
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.
pawn Код:
if( strcmp( key , "VehicleLocX1", true ) == 0) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVlocx1] = strval( val );}
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.