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=275812)
foreach -
iPLEOMAX - 11.08.2011
What am I doing wrong here?
pawn Code:
new Iterator:MaxSavedSlots<MAX_PLAYERS>; //Global
foreach(MaxSavedSlots, slot) //OnPlayerConnect
{
//stuff..
}
I get this:
pawn Code:
warning 203: symbol is never used: "YSI_gCMaxSavedSlots"
Re: foreach -
Darnell - 11.08.2011
pawn Code:
new Iterator:YSI_gCMaxSavedSlots<MAX_PLAYERS>; //Global
foreach(YSI_gCMaxSavedSlots, slot) //OnPlayerConnect
{
//stuff..
}
I hope it helped
...
Re: foreach -
Grim_ - 11.08.2011
Do you ever add or remove data from or to the iterator variable? If not, try to do so by using one of the following functions:
Iter_Add( MaxSavedSlots, value );
Iter_Remove( MaxSavedSlots, value );