SA-MP Forums Archive
error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error (/showthread.php?tid=172211)



error - iJumbo - 29.08.2010

hi i have this errors and warning> error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

on this command

dcmd_ban(playerid, params[])
{
new id, tmp[128],string[128];
if(sscanf(params, "uz", id, tmp)) return SendClientMessage(playerid, COLOR_RED, "[AIUTO]: /BAN [ID / NOME] [MOTIVO]");
if(!IsPlayerConnected(id) || id == playerid) return SendClientMessage(playerid, COLOR_RED, "и offline o sei te stesso");
format(string, sizeof string, "Player: %s и stato bannato da %s%s%",Name(id), AdminName(playerid),tmp);
SendClientMessageToAll(YELLOW, string), print(string);
format(string,sizeof(string),"Bannato da %s",AdminName(playerid));
SendCommandMsg(playerid,"ban");
return BanEx(id,tmp);
}


error line is :
format(string, sizeof string, "Player: %s и stato bannato da %s%s%",Name(id), AdminName(playerid),tmp);


help please


Re: error - Jeffry - 29.08.2010

Try:
pawn Код:
format(string, sizeof(string), "Player: %s и stato bannato da %s%s%",Name(id), AdminName(playerid),tmp);



Re: error - iJumbo - 29.08.2010

same error


Re: error - Jeffry - 29.08.2010

Do you have defined/forwarded the "AdminName" and the "Name"? Or used them before?

Or try:
pawn Код:
format(string, sizeof(string), "Player: %s и stato bannato da %s [ %s ]",Name(id), Name(playerid),tmp);



Re: error - Hiddos - 29.08.2010

Have you actually created the AdminName function?


Re: error - iJumbo - 29.08.2010

yes i create it is a stock