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?
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?
|
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.
I have deleted those and everything works fine.