SA-MP Forums Archive
FloatStr Error - 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: FloatStr Error (/showthread.php?tid=302374)



FloatStr Error - aniol16 - 08.12.2011

Hi, a have problems. In floatstr and strtok.
Error:
Код:
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
Code:
Код:
new e;
HouseInfo[x][henter_x] = floatstr(strtok(dest, e, ',')); //error
HouseInfo[x][henter_y] = floatstr(strtok(dest, e, ',')); //error
HouseInfo[x][henter_z] = floatstr(strtok(dest, e, ',')); //error
Thanks.


Respuesta: FloatStr Error - OPremium - 08.12.2011

strtok should have only 2 parameters:

pawn Код:
stock strtok(const string[], &index)
Try sscanf plugin, it makes things like this easier

pawn Код:
sscanf(dest, "p<,>fff", HouseInfo[x][henter_x], HouseInfo[x][henter_y], HouseInfo[x][henter_z]);
Sscanf download here: https://sampforum.blast.hk/showthread.php?tid=120356


Re: FloatStr Error - aniol16 - 08.12.2011

I'm using sscanf
Thanks Men!!