I Get The FOllowing Errors When i Compile.
#1

I Get The Errors Of

Код:
C:\Documents and Settings\Chris\My Documents\HayZaticDogFight\gamemodes\HayZaticDogFight.pwn(125) : error 017: undefined symbol "gTeam"
C:\Documents and Settings\Chris\My Documents\HayZaticDogFight\gamemodes\HayZaticDogFight.pwn(125) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Chris\My Documents\HayZaticDogFight\gamemodes\HayZaticDogFight.pwn(125) : error 017: undefined symbol "USA"
Yes, I Did Define gteam at the top

Код:
new gTeam[MAX_PLAYERS];
I Now Do not know what the problem is, here is where it says the Error Is Being Created.

Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
		{
    	case 0: gTeam[playerid] = USA;
		case 1: gTeam[playerid] = Japan;
	}
		if(gTeam[playerid] == USA)
	{
		SetPlayerColor(playerid,USA_COLOUR); //Green
	}
		if(gTeam[playerid] == Japan)
	{
		SetPlayerColor(playerid,Japan_COLOUR); //Blue
	}
At The Top I Do Have

Код:
#define USA 1
#define Japan 2
Please Help
Reply
#2

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    switch(
classid)
    {
        case 
1: { SetPlayerColor(playerid,USA_COLOUR); }
        case 
2: { SetPlayerColor(playerid,Japan_COLOUR); }
    }
    return 
1;

Reply
#3

Make sure that you have it outside

pawn Код:
#if defined filterscript
Or any other define that could alter it so the variables/defines would not be created.
Reply
#4

Its Not a Filterscript so i know that shouldnt be there, still trying to fix it

Fixed it, i did have If Defined Filter script, and #else if so yea! FIXED
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)