SA-MP Forums Archive
I Get The FOllowing Errors When i Compile. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I Get The FOllowing Errors When i Compile. (/showthread.php?tid=265511)



I Get The FOllowing Errors When i Compile. - HayZatic - 01.07.2011

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


Re: I Get The FOllowing Errors When i Compile. - Shadoww5 - 01.07.2011

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




Re: I Get The FOllowing Errors When i Compile. - [HiC]TheKiller - 01.07.2011

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.


- HayZatic - 01.07.2011

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