17.01.2016, 18:05
Nothing to explain. Take a look.
Error:
Error line:
PHP код:
CMD:offban(playerid,params[])
{
new poruka[256],BanIme[MAX_PLAYER_NAME],Razlog,FileString[128];
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,-1,"{FF0000}Greska:{FFFFFF} Niste se spojili na server");
if(pUlogiran[playerid] != 1) return SendClientMessage(playerid,-1,"{FF0000}Greska:{FFFFFF} Niste ulogirani na server.");
if(PlayerInfo[playerid][pAdministrator] < 5) return SendClientMessage(playerid,-1,"{FF0000}Greska:{FFFFFF} Nemate dozvolu za tu komandu");
if(ADuty[playerid] != 1) return SendClientMessage(playerid,-1,"{FF0000}Greska:{FFFFFF} Niste uzeli administratorsku duznost (/aduty)");
if(sscanf(params,"s[MAX_PLAYER_NAME]s",BanIme,Razlog)) return SendClientMessage(playerid,-1,"{FF0000}Koristenje:{FFFFFF} /banoffline [Ime_Prezime] [Razlog]");
{
format(FileString,sizeof(FileString),"/Korisnici/%s.ini",BanIme);
if(!fexist(FileString)) return SendClientMessage(playerid,-1,"{FF0000}Greska:{FFFFFF} Upisano ime nije pronadeno u databazi.");
else
{
if(Razlog < 5 || Razlog > 20) return SendClientMessage(playerid,-1,"{FF0000}Greska:{FFFFFF} Razlog moze sadrzavati minimalno 5 i maximalno 20 slova");
new ime[128];
GetPlayerName(playerid,ime,128);
new INI:File = INI_Open(FileString);
INI_SetTag(File,"Podatci");
INI_WriteInt(File,"pBanned",1);
INI_WriteString(File,"pBanReason",Razlog);
INI_WriteString(File,"pBannedBy",ime);
INI_Close(File);
format(poruka,256,"{0080FF}WG:{FFFFFF} Uspjesno ste banali offline igraca: %s.",BanIme);
SendClientMessage(playerid,-1,poruka);
format(poruka,256,"{FF0000}[A-INFO]: %s %s je banovo offline igraca %sa.",GetPlayerAdminRank(playerid),GetName(playerid),BanIme);
SendAdminMessage(-1,poruka);
}
}
return 1;
}
PHP код:
gamemodes\WGRP.pwn(1452) : error 035: argument type mismatch (argument 3)
PHP код:
INI_WriteString(File,"pBanReason",Razlog);