06.06.2012, 22:19
Hello,i coded this !unban cmd for IRC,but i get 2 errors:
4660 : error 035: argument type mismatch (argument 1)
4661 : error 035: argument type mismatch (argument 1)
Full code:
Line 4660:
Line 4661:
I use Y_INI,what's wrong?
4660 : error 035: argument type mismatch (argument 1)
4661 : error 035: argument type mismatch (argument 1)
Full code:
pawn Код:
IRCCMD:unban(botid, channel[], user[], host[], params[])
{
if(IRC_IsOp(botid,channel,user))
{
new tmp[24];
new msg[100];
if(!strlen(params)) return IRC_GroupSay(gGroupID, channel,"4Error: You didnt type a name");
if(!fexist(UserPath(tmp))) return IRC_GroupSay(gGroupID, channel,"* Sorry, Account not found.");
new INI:File = INI_Open(UserPath(tmp));
INI_WriteInt(File, "Banned", 0);
INI_Close(File);
format(msg,sizeof msg,"2Success. - Account %s Unbanned -",tmp);
IRC_GroupSay(gGroupID,IRC_CHANNEL,msg);
}else IRC_GroupSay(gGroupID, channel,"4Error: You must be operator to use this command.");
return 1;
}
pawn Код:
if(!fexist(UserPath(tmp))) return IRC_GroupSay(gGroupID, channel,"* Sorry, Account not found.");
pawn Код:
new INI:File = INI_Open(UserPath(tmp));