help me with this 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: help me with this error (
/showthread.php?tid=172453)
help me with this error -
iJumbo - 30.08.2010
i have this command
pawn Код:
dcmd_ban(playerid, params[])
{
if(GetPVarInt(playerid, "Admin") >= 1) //vede se и + di lvl 1
{
new id, tmp[128],string[128];
if(sscanf(params, "uz", id, tmp)) return SendClientMessage(playerid, RED, "[AIUTO]: /BAN [ID / NOME] [MOTIVO]");
if(!IsPlayerConnected(id) || id == playerid) return SendClientMessage(playerid, RED, "Questo player и offline o sei tu");
format(string, sizeof string, "Player: %s и stato bannato da %s [Morivo :%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);
}
i get one error
pawn Код:
error 017: undefined symbol "id"
but id is defined :/:/:/:/:/:/
Re: help me with this error -
iggy1 - 30.08.2010
pawn Код:
dcmd_ban(playerid, params[])
{
new id,tmp[128];
if(GetPVarInt(playerid, "Admin") >= 1) //vede se и + di lvl 1
{
new string[128];
if(sscanf(params, "uz", id, tmp)) return SendClientMessage(playerid, RED, "[AIUTO]: /BAN [ID / NOME] [MOTIVO]");
if(!IsPlayerConnected(id) || id == playerid) return SendClientMessage(playerid, RED, "Questo player и offline o sei tu");
format(string, sizeof string, "Player: %s и stato bannato da %s [Morivo :%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);
}
Try that id is only defined inside the block of code so banex cant use it same with tmp. Tmp and id scope was inside the block of code.
Re: help me with this error -
MartinDee - 30.08.2010
which line?
Re: help me with this error -
iJumbo - 30.08.2010
oh my bad -_- now work