Errors After Mixing a filterscript and a gamemode
#9

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
Also you was using foreach in the wrong way
You typed
pawn Код:
foreach(new id : Player)
Maybe it was an old usage but it should be
pawn Код:
foreach(Player, id)
Actually
pawn Код:
foreach(Player, id)
is for the older versions, it must be:
pawn Код:
foreach(new id : Player)
A quote from foreach's thread:

Quote:
Originally Posted by ******
Посмотреть сообщение
Introduction

foreach replaces some* loops (normally the main player loop) with a faster, more efficient loop. Example:

pawn Код:
for (new i = 0; i != MAX_PLAYERS; ++i)
{
    if (IsPlayerConnected(i))
    {
        printf("Player %d is connected", i);
    }
}
Simply becomes:

pawn Код:
foreach (new i : Player)
{
    printf("Player %d is connected", i);
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)