Sscanf problem.
#2


if(sscanf(params, "uddd", id, OptionalID, Color1, Color2))

Try this instead:

pawn Код:
if(sscanf(params, "uddd", id, OptionalID, Color1, Color2)) //if it "aint" that
{
    if(!sscanf(params, "usid", id, CarName, Color1, Color2)) //but it is that - go to the appropriate script part
    {
        goto by_name;
    }
    else //if it "aint" that either - tell them they fail
    {
        return print("Usage: /gpv [playerid/PartOfName] [CarID/CarName] [Color 1] [Color 2]")
    }
}
else // yeah whatever
{
//poop
}
Reply


Messages In This Thread
Sscanf problem. - by pulposlaw - 03.06.2009, 12:32
Re: Sscanf problem. - by Weirdosport - 03.06.2009, 14:31
Re: Sscanf problem. - by pulposlaw - 03.06.2009, 14:39
Re: Sscanf problem. - by Weirdosport - 03.06.2009, 14:44
Re: Sscanf problem. - by pulposlaw - 03.06.2009, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)