undefined symbol "TEAM_ALLIES"
#1

Hi, I seem to keep getting this problem.

Код:
C:\Users\John\Desktop\Script\gamemodes\Bayside.pwn(364) : error 017: undefined symbol "TEAM_ALLIES"
Lines 359-364.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new gTeam[MAX_PLAYERS];
    SetPlayerTeamFromClass(playerid, classid);
    if(classid == 0) {
        gTeam[playerid] = TEAM_ALLIES;
Reply
#2

It's because you haven't defined it.
Reply
#3

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
It's because you haven't defined it.
I forgot to mention that I have these at the top of my script.

pawn Код:
#define TEAM_ALLIES 1
#define TEAM_AXIS 2
Reply
#4

Not sure if this would cause the problem or not but try this.

pawn Код:
#define TEAM_ALLIES 0
#define TEAM_AXIS 1
Reply
#5

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
It's because you haven't defined it.
Quote:
Originally Posted by new121
Посмотреть сообщение
Not sure if this would cause the problem or not but try this.

pawn Код:
#define TEAM_ALLIES 0
#define TEAM_AXIS 1
I am still getting the same error
Reply
#6

Do you have those near the top of the script? and if not do you have this near the top?

pawn Код:
new gTeam[MAX_PLAYERS];
Reply
#7

Are you sure you have TEAM_ALLIES defined? Can you set the value of gTeam to TEAM_ALLIES under another callback and see if it still gives u the error?
Reply
#8

Quote:
Originally Posted by new121
Посмотреть сообщение
Do you have those near the top of the script? and if not do you have this near the top?

pawn Код:
new gTeam[MAX_PLAYERS];
Thanks for the reply.
I had this at the top of my script and in the code above, so I deleted it from the one above and I no longer get that error.

However I have this error too.
Код:
C:\Users\John\Desktop\Script\gamemodes\Bayside.pwn(362) : error 017: undefined symbol "SetPlayerTeamFromClass"
Lines 360-364.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid);
    if(classid == 0) {
        gTeam[playerid] = TEAM_ALLIES;
Reply
#9

Sorry for the double post.

I have figured it out.

I accidentally left these in.
pawn Код:
#if defined FILTERSCRIPT
pawn Код:
#else
pawn Код:
#endif
I have deleted those and everything works fine.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)