Foreach - 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: Foreach (
/showthread.php?tid=259030)
Foreach -
Mean - 02.06.2011
Okay, so I determinated that my server has been using pretty high CPU usage all the time, that's why I decided to use Unix timestamps for timers and all.
Now the point is, with all thoose optimizations, I added foreach (ofc), and I'm getting an error:
Код:
error 017: undefined symbol "YSI_gS"
While the code is:
pawn Код:
foreach( Player, i ) // That's the error line...
{
if( GetPVarInt( i, "Level" ) < 1 ) // I assume you know what this is for.
{
// Etc Etc, this code has no issues in it, since I get this error on ALL THE FOREACH LOOPS!
}
}
So, anyone has a solution, I doubt
would do anything.
If I just use
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS (100)
for( new i = 0; i < MAX_PLAYERS; ++i )
{
//...
}
I will get no error messages.
Re: Foreach - [L3th4l] - 02.06.2011
Re: Foreach -
Mean - 02.06.2011
Wow, I never knew spaces could affect that o_O...
Thankies!