sscanf warning: Format specifier does not match parameter count.
#2

You can to do like that :
pawn Код:
COMMAND:give(playerid, params[])
{    
    if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /give <item> <id> <qty>");
   
    new
        id,
        qty;

    if(strcmp(params, "test", true, 4) == 0)
    {
        if(sscanf(params, "'test 'ud", id, qty)) return SendClientMessage(playerid, -1, "Usage: /give test <id> <qty>");
       
        // actions
    }
   
    else if(strcmp(params, "autre", true, 5) == 0)
    {
        if(sscanf(params, "'autre 'ud", id, qty)) return SendClientMessage(playerid, -1, "Usage: /give autre <id> <qty>");
       
        // actions
    }
   
    return SendClientMessage(playerid, -1, "Item list : dsfsdfsdf");
}
Reply


Messages In This Thread
sscanf warning: Format specifier does not match parameter count. - by Baltimore - 27.11.2014, 10:16
Re : sscanf warning: Format specifier does not match parameter count. - by Dutheil - 27.11.2014, 14:57

Forum Jump:


Users browsing this thread: 1 Guest(s)