Help with errors!
#1

pawn Код:
command(mute, playerid, params[])
{
    new string[128]
    new ID; //Error Line
    new pname[24]
    new aname[24]// Error line
    GetPlayerName(ID, pname, sizeof(pname));// Error line
    GetPlayerName(playerid,aname,24);
   
    if( PlayerInfo[playerid][Admin] >= 1)
    {
        if(sscanf(params, "i", ID))
        {
            SendClientMessage(playerid, COLOUR_ORANGE, "Hint: /mute (playerid)" );
            return 1;
        }
        if(!IsPlayerConnected(ID))
        {
            SendClientMessage(playerid, COLOUR_ORANGE, "Hint: Invalid Player ID");
            return 1;
        }
        format(string, sizeof(string), "%s(%d) has been muted by Admin %s", pname, ID, aname);
        SendToAdmins(ADMIN_WARNING, string);
        PlayerInfo[ID][Muted] = 1;
        SendClientMessage(ID, COLOUR_ORANGE, "You have been muted. To request to be unmuted use /muterequest" );
    }
    return 1;
}
I gave the command a go but I think I have failed! Please help me try to fix these errors.

pawn Код:
(1464) : error 001: expected token: ";", but found "new"
(1466) : error 001: expected token: ";", but found "new"
(1467) : error 001: expected token: ";", but found "-identifier-"
Reply


Messages In This Thread
Help with errors! - by cloudysky - 09.06.2011, 17:40
Re: Help with errors! - by *IsBack - 09.06.2011, 17:42

Forum Jump:


Users browsing this thread: 1 Guest(s)