[Help]Undefined symbol "i" - 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: [Help]Undefined symbol "i" (
/showthread.php?tid=288060)
[Help]Undefined symbol "i" -
Swizzzy - 06.10.2011
Title says it all, Please can someone help me fix this..I'll be very appreciative, Thank you.
Code
pawn Код:
CMD:sendmessagetcops(playerid, params[])
{
for(new i=0; i <= MAX_PLAYERS; i++);
{
if(IsPlayerConnected(i))
{
if(pTeam[i] == TEAM_LSPD)
{
SendClientMessage(i, COLOR_BLUE, "A Message was sent to all online officers online");
}
}
}
}
ERRORS
Код:
C:\Users\Parent\Desktop\Server\gamemodes\newtdm.pwn(246) : warning 215: expression has no effect
C:\Users\Parent\Desktop\Server\gamemodes\newtdm.pwn(266) : error 036: empty statement
C:\Users\Parent\Desktop\Server\gamemodes\newtdm.pwn(268) : error 017: undefined symbol "i"
C:\Users\Parent\Desktop\Server\gamemodes\newtdm.pwn(270) : error 017: undefined symbol "i"
C:\Users\Parent\Desktop\Server\gamemodes\newtdm.pwn(272) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: [Help]Undefined symbol "i" -
Pharrel - 06.10.2011
pawn Код:
for(new i=0; i <= MAX_PLAYERS; i++);// <- ; isnt used in conditions!
Re: [Help]Undefined symbol "i" -
Wesley221 - 06.10.2011
pawn Код:
for(new i=0; i <= MAX_PLAYERS; i++);
You dont need the ';' at the end of the for(). Otherwise you tell the compiler to close it, and after that youre opening it again
Re: [Help]Undefined symbol "i" -
random123 - 06.10.2011
try this
Код:
CMD:sendmessagetcops(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(pTeam[playerid] == TEAM_LSPD)
{
SendClientMessage(playerid, COLOR_BLUE, "A Message was sent to all online officers online");
}
}
}
}
Re: [Help]Undefined symbol "i" -
System64 - 06.10.2011
random123 - fail
pawn Код:
CMD:sendmessagetcops(playerid, params[])
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pTeam[i] == TEAM_LSPD)
{
SendClientMessage(i, COLOR_BLUE, "A Message was sent to all online officers online");
}
}
}
}
Re: [Help]Undefined symbol "i" -
Davz*|*Criss - 06.10.2011
Woaah yeah he fail, The message would go to self.
Re: [Help]Undefined symbol "i" -
TheLazySloth - 06.10.2011
Edit: NVM.