error 035: argument type mismatch (argument 2)
#2

try this:
pawn Код:
SendClientMessageToAdmins(COLOR_RED, str);
I think you don't need to give the playerid, in this case I because it is already defined in the function sendclientmessagetoadmins or something

Try it, and tell it if it worked

So it will be:
pawn Код:
CMD:report(playerid, params[])
{
    new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], str[128], reason, iD;
    if (sscanf(params, "dz", iD, reason)) return SendClientMessage(playerid, COLOR_RED, "Usage: /report [id] [reason]");
    if (iD == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid ID.");
    if (playerid == iD) return SendClientMessage(playerid, COLOR_RED, "You can't report yourself.");
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(iD, aName, sizeof(aName));
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
     
           
                format(str, sizeof(str), "[%d]%s has reported [%d]%s for: %s", playerid, pName, iD, aName, reason);
                SendClientMessageToAdmins(COLOR_RED, str);
           
        }
    }
    return 1;
}
Reply


Messages In This Thread
error 035: argument type mismatch (argument 2) - by cod5devious - 27.05.2012, 08:31
Re: error 035: argument type mismatch (argument 2) - by Jstylezzz - 27.05.2012, 08:33
Re: error 035: argument type mismatch (argument 2) - by cod5devious - 27.05.2012, 08:35
Re: error 035: argument type mismatch (argument 2) - by MP2 - 27.05.2012, 08:36
Re: error 035: argument type mismatch (argument 2) - by cod5devious - 27.05.2012, 08:37
Re: error 035: argument type mismatch (argument 2) - by Jstylezzz - 27.05.2012, 08:37

Forum Jump:


Users browsing this thread: 1 Guest(s)