SSCANF Help!
#5

pawn Код:
YCMD:gang(playerid, params[], pHELPS)
{
    new gParams[10], gName[20];
    if(sscanf(params, "s[10] ", gParams))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "USE: /gang [create/invite]");
        return 1;
    }
    if(strcmp(params, "create", true))
    {
        if(sscanf(params, "s[10]s[20]", gParams, gName))
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "USE: /gang create [Name]");
            return 1;
        }
        SendPlayerMessage(playerid, 0xFFFFFFFF, "Created: %s", gName); // debug
        PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); // debug
        return 1;
    }
    return 1;
}

The sscanf If run correctly, but the "debug" is not executed, the code crashes.
Reply


Messages In This Thread
SSCANF Help! - by SuperChock - 14.01.2012, 18:07
Re: SSCANF Help! - by Lee_Percox - 14.01.2012, 18:15
Re: SSCANF Help! - by SuperChock - 14.01.2012, 18:22
Re: SSCANF Help! - by Lee_Percox - 14.01.2012, 18:31
Re: SSCANF Help! - by SuperChock - 14.01.2012, 18:42
Re: SSCANF Help! - by SuperChock - 14.01.2012, 21:46

Forum Jump:


Users browsing this thread: 1 Guest(s)