sscanf / dcmd help
#1

This is my code

pawn Код:
dcmd_cm(playerid, params[])
{
    if(gTeam[playerid] == TEAM_COPP)
    {
        new message[128];
        if(sscanf(params, "s", message)) SendClientMessage(playerid, COLOR_USAGE, "USAGE: /cm (message)");

        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && gTeam[playerid] == TEAM_COP)
            {
                new playername[MAX_PLAYER_NAME], string[128];
                GetPlayerName(i, playername, sizeof(playername));

                format(string, sizeof(string), "cop radio: %s(%d) %s", playername, i, message);
                SendClientMessage(i, COLOR_TEAMCHAT, string);

                format(string, sizeof(string), "cop radio: %s(%d) %s", playername, i, message);
                printf("%s", string);
                return 1;
            }
        }
        return 1;
    }
    return 0;
}
And this is my warning.
Код:
sscanf warning: Strings without a length are deprecated, please add a destination size.
Reply


Messages In This Thread
sscanf / dcmd help - by Unknown123 - 07.02.2011, 11:50
Re: sscanf / dcmd help - by Hiddos - 07.02.2011, 12:14
Re: sscanf / dcmd help - by Unknown123 - 07.02.2011, 12:23
Re: sscanf / dcmd help - by HyperZ - 07.02.2011, 13:08
Re: sscanf / dcmd help - by Unknown123 - 07.02.2011, 13:20

Forum Jump:


Users browsing this thread: 3 Guest(s)