08.10.2014, 03:08
hello, im trying to make a offline ban command but i get this:
is im doing wrong?
Код:
lostcity.pwn(7027) : error 035: argument type mismatch (argument 3) lostcity.pwn(7028) : error 035: argument type mismatch (argument 3)
pawn Код:
CMD:oban(playerid,params[])
{
new string[124], string1[124], reason[105];
if(!(pInfo[playerid][pAdminLevel] >= 2)) return SCM(playerid, COLOR_LIGHTBLUE,"You are not authorized to use this command");
format(string,sizeof(string),"/ZMA/Users/%s.ini",params);
if(isnull(params)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /oban [Player Name] [Reason]");
if(!fexist(string)) return SendClientMessage(playerid,-1,"This user account is not found in our database. Please re-check the username.");
{
new INI:File = INI_Open(string);
format(string1, sizeof(string1), "%s has been Offline Banned by %s %s. [REASON: %s]", params,GetAdminName(playerid),PlayerName(playerid),reason);
SendClientMessageToAll(COLOR_LIGHTBLUE,string1);
INI_SetTag(File,"data");
INI_WriteInt(File,"pBanned", 1);
INI_WriteString(File,"pBanAdmin",GetAdminName(playerid)); //error line 7027
INI_WriteString(File,"pBanReason",reason); //error line 7028
INI_Close(File);
}
return 1;
}