SA-MP Forums Archive
undefined symbol "TEAM_ALLIES" - 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)
+--- Thread: undefined symbol "TEAM_ALLIES" (/showthread.php?tid=326207)



undefined symbol "TEAM_ALLIES" - captainjohn - 16.03.2012

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;



Re: undefined symbol "TEAM_ALLIES" - T0pAz - 16.03.2012

It's because you haven't defined it.


Re: undefined symbol "TEAM_ALLIES" - captainjohn - 16.03.2012

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



Re: undefined symbol "TEAM_ALLIES" - new121 - 16.03.2012

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

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



Re: undefined symbol "TEAM_ALLIES" - captainjohn - 16.03.2012

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


Re: undefined symbol "TEAM_ALLIES" - new121 - 16.03.2012

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];



Re: undefined symbol "TEAM_ALLIES" - suhrab_mujeeb - 16.03.2012

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?


Re: undefined symbol "TEAM_ALLIES" - captainjohn - 16.03.2012

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;



Re: undefined symbol "TEAM_ALLIES" - captainjohn - 16.03.2012

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.