UnExplained Error In gTeam [+REP]
#1

My teams for USA are correctly defined
Quote:

#define TEAM_USA1 //U.S 1st division
#define TEAM_USA1_COLOR 0x0000FFFF

#define TEAM_USA2 //U.S 2nd division
#define TEAM_USA2_COLOR 0x0000FFFF

#define TEAM_USA3 //U.S 3rd division
#define TEAM_USA3_COLOR 0x0000FFFF

I have this
Quote:

new gTeam[MAX_PLAYERS];

However error is unexplained here.
Quote:

SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_USA1;//error here line 107
SetPlayerTeam(playerid, 1);
}
else if (classid == 1)
{
gTeam[playerid] = TEAM_USA2; //error here line 112
SetPlayerTeam(playerid, 1);
}
else if (classid == 2)
{
gTeam[playerid] = TEAM_USA3; //error here line 117
SetPlayerTeam(playerid, 1);
}
}

error message appears like this.
Quote:

(107) : error 029: invalid expression, assumed zero
(112) : error 029: invalid expression, assumed zero
(117) : error 029: invalid expression, assumed zero

These three teams are allies, I set USA to 3 different teams for purposes I dont care to explain. Can some one please explain where I went wrong?
Reply
#2

#define TEAM_USA1 1//U.S 1st division
#define TEAM_USA1_COLOR 0x0000FFFF

#define TEAM_USA2 2//U.S 2nd division
#define TEAM_USA2_COLOR 0x0000FFFF

#define TEAM_USA3 3//U.S 3rd division
#define TEAM_USA3_COLOR 0x0000FFFF
Reply
#3

Nvm I firgured that second bit myself. Thanks for pointing out my retarded mistake.
I havent workd with gteam for awhile. Heres ur rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)