How do I solve this?
#1

pawn Код:
dcmd_irckick(playerid,params)
{
    new string[128];
    new username[MAX_PLAYER_NAME];
    new pname[MAX_PLAYER_NAME];
    new cmdreason;
    if(sscanf(params,"us",username,cmdreason))
    {
       SendClientMessage(playerid,COLOR_ERROR,"USAGE: /irckick (UserName) (Reason)");
       return 1;
    }
    if(!IRC_IsUserOnChannel(gGroupID,IRC_CHANNEL,username))
    {
       SendClientMessage(playerid,COLOR_ERROR,"User not connected on IRC Channel");
       return 1;
    }
    GetPlayerName(playerid,pname,sizeof(pname));
    format(string,sizeof(string),"9[ADMIN]Administrator %s(%d) has kicked you from in-game. Reason : %s.",pname,playerid,cmdreason);
    IRC_Notice(gBotID[0],username,string);
    format(string,sizeof(string),"[ADMIN]Administrator %s(%d) has kicked %s from IRC. Reason : %s.",pname,playerid,username,cmdreason);
    SendClientMessageToAll(COLOR_ADMIN,string);
    format(string,sizeof(string),"9[ADMIN]Administrator %s(%d) has kicked %s from IRC. Reason : %s.",pname,playerid,username,cmdreason);
    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
    IRC_KickUser(gBotID[0],IRC_CHANNEL,username);
    return 1;
}
Hope someone would help me,
Thanks.
Reply
#2

Errors :
pawn Код:
C:\Users\Bing\Desktop\Started\Gamemode\robbing.pwn(3609) : error 035: argument type mismatch (argument 2)
C:\Users\Bing\Desktop\Started\Gamemode\robbing.pwn(4667) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
pawn Код:
LINE 3609 : dcmd(irckick,7,cmdtext);
LINE 4667 : if(sscanf(params,"us",username,cmdreason))
Sorry, I forgot about the errors.
Hope someone would help me solve this.
Reply
#3

pawn Код:
dcmd_irckick(playerid,params)
to:
pawn Код:
dcmd_irckick(playerid,params[])
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
dcmd_irckick(playerid,params)
to:
pawn Код:
dcmd_irckick(playerid,params[])
Hell yeah, Totally forgot about those brackets.. xd
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)