PDA

View Full Version : FloatStr Error


aniol16
08/12/2011, 05:53 PM
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. :)

OPremium
08/12/2011, 07:03 PM
strtok should have only 2 parameters:


stock strtok(const string[], &index)


Try sscanf plugin, it makes things like this easier :)


sscanf(dest, "p<,>fff", HouseInfo[x][henter_x], HouseInfo[x][henter_y], HouseInfo[x][henter_z]);


Sscanf download here: http://forum.sa-mp.com/showthread.php?t=120356

aniol16
08/12/2011, 07:06 PM
I'm using sscanf :)
Thanks Men!! :D