A little params problem
#3

Use sscanf instead? :S
strtok doesn't handle Floats, only strings or values other than float values.

add:
pawn Код:
#include <sscanf2>
to the top of your script after downloading the latest sscanf from ******.
Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Here thats with SSCANF2
CMD:gotopos(playerid,params[])
{
new Float:X,Float:Y,Float:Z;
if(sscanf(params,"fff",X,Y,Z)) return SendClientMessage(playerid,YOURCOLOR,"YOUR ERROR MESSAGE!!!");
{
SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
Wrong.
pawn Код:
CMD:gotopos(playerid, params[])
{
    new Float:x, Float:y, Float:z;
    if(sscanf(params, "fff", x, y, z)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /gotopos x y z");
    SetPlayerPos(playerid, x, y, z);
    return 1;
}
Reply


Messages In This Thread
A little params problem - by Frede - 13.01.2013, 07:25
AW: A little params problem - by BiosMarcel - 13.01.2013, 07:34
Re: A little params problem - by Threshold - 13.01.2013, 07:34
AW: A little params problem - by BiosMarcel - 13.01.2013, 07:37
Re: A little params problem - by Frede - 13.01.2013, 07:38
AW: A little params problem - by BiosMarcel - 13.01.2013, 07:41
Re: AW: A little params problem - by Threshold - 13.01.2013, 07:41
Re: A little params problem - by RajatPawar - 13.01.2013, 07:42
Re: A little params problem - by Frede - 13.01.2013, 07:42
AW: A little params problem - by BiosMarcel - 13.01.2013, 07:44

Forum Jump:


Users browsing this thread: 1 Guest(s)