PM command error
#1

Got an error for this
pawn Код:
CMD:pm(playerid, params[])
{
    new string[128], id, text[100];
    if(sscanf(params, "us[100]", id, text)) return SendClientMessage(playerid, COLOR_GREY, "[Correct Syntax]: /pm [ playername / playerid ]");
    {
        format(string, sizeof(string), "[PM] sent %s: %s", GetName(id), text);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        format(string, sizeof(string), "[PM] from %s: %s", GetName(playerid), text);
        SendClientMessage(id, COLOR_YELLOW, string);
        if(PlayerInfo[playerid][Admin] >= 1)
        {
            new string2[100];
            format(string2, sizeof(string2), "[PM] from %s to %s: %s", GetName(playerid), GetName(id), text);
            SendMessageToAdmin(COLOR_LIGHT_GREY, string2);
        }
    }
    return 1;
}
The Error:
Код:
C:\Users\Steven\Desktop\Castaway Island Roleplay\filterscripts\irc.pwn(786) : error 035: argument type mismatch (argument 2)
C:\Users\Steven\Desktop\Castaway Island Roleplay\filterscripts\irc.pwn(789) : error 035: argument type mismatch (argument 2)
C:\Users\Steven\Desktop\Castaway Island Roleplay\filterscripts\irc.pwn(791) : error 035: argument type mismatch (argument 2)
C:\Users\Steven\Desktop\Castaway Island Roleplay\filterscripts\irc.pwn(796) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
It should be alright with my other scripts but not in this script.
Reply
#2

Hi,
exactly what lines?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)