Compiling Error [REPEVERYONE]
#1

Hello!

I'm trying to run COD6 Script.
Currently, i get these errors.
Quote:

D:\San ANDREAS SERVER\gamemodes\COD6v3.pwn(4687) : error 017: undefined symbol "foreach"
D:\San ANDREAS SERVER\gamemodes\COD6v3.pwn(4687) : error 029: invalid expression, assumed zero
D:\San ANDREAS SERVER\gamemodes\COD6v3.pwn(4687) : error 017: undefined symbol "Player"
D:\San ANDREAS SERVER\gamemodes\COD6v3.pwn(4687) : fatal error 107: too many error messages on one line

I would really need help!
I will rep anyone who tries to help!
Thanks.
Reply
#2

pawn Код:
#include <foreach>
Link: https://sampforum.blast.hk/showthread.php?tid=92679
Reply
#3

Also, If this "error 017: undefined symbol Player" continues. Put new Player; at the upper most line of code @ Line 4687.
Reply
#4

Quote:
Originally Posted by PinEvil
Посмотреть сообщение
Also, If this "error 017: undefined symbol Player" continues. Put new Player; at the upper most line of code @ Line 4687.
If Player still isn't defined after including foreach, something is wrong with the include.

Quote:
Originally Posted by ******
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
#5

Thanks to everyone, fixed!
Reply
#6

Wronge Section !! you must post this topic into the "Scripting Help"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)