SSCANF Problem
#1

I'm trying to make a clan system, but there's a problem with the way I'm setting parameters.
What happens is, what ever I type after the /clan command, it takes it as the "create" one, disregarding any other thing.

pawn Код:
CMD:clan(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
            // Non sscanf stuff, new's
        if(sscanf(params, "s", clanrelated)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /clan [parameter]") && SendClientMessage(playerid, COLOR_WHITE, "PARAMETERS: create, show, hide, invite, acceptinvite");
        if(sscanf(clanrelated, "create"))
        {
            // Stuff
        }
        else if(sscanf(clanrelated, "show"))
        {
            // Stuff
        }
        else if(sscanf(clanrelated, "hide"))
        {
            // Stuff
        }
        else if(sscanf(clanrelated, "invite"))
        {
            // Stuff
        }
        else if(sscanf(clanrelated, "acceptinvite"))
        {
            // Stuff
        }
    }
    return 1;
}
Reply


Messages In This Thread
SSCANF Problem - by Dudits - 20.07.2010, 02:33
Re: SSCANF Problem - by bigcomfycouch - 20.07.2010, 02:35
Re: SSCANF Problem - by Dudits - 20.07.2010, 02:39
Re: SSCANF Problem - by Dudits - 20.07.2010, 02:46
Re: SSCANF Problem - by bigcomfycouch - 20.07.2010, 02:47
Re: SSCANF Problem - by Extremo - 20.07.2010, 02:53
Re: SSCANF Problem - by Dudits - 20.07.2010, 03:08
Re: SSCANF Problem - by Carlton - 20.07.2010, 03:10
Re: SSCANF Problem - by Dudits - 20.07.2010, 03:24
Re: SSCANF Problem - by Carlton - 20.07.2010, 03:28

Forum Jump:


Users browsing this thread: 1 Guest(s)