2 Compling Errors
#1

Stated in title
pawn Код:
public OnPlayerSpawn(playerid)

    SetPlayerInterior(playerid,0);
   
    if(gTeam[playerid] == TEAM_GREEN)
    {
        SetPlayerColor(playerid,0x33AA33AA); // green
        GameTextForPlayer(playerid,"~g~Let the fight begin",3000,5);
    }
   
    else if(gTeam[playerid] == TEAM_BLUE)
    {
        GameTextForPlayer(playerid,"~b~Let the fight begin",3000,5);
        SetPlayerColor(playerid,0x3333AAAA); // blue
        }
Errors:

Код:
J:\SA-MP servers\deathmatch\gamemodes\0-0.pwn(230) : error 010: invalid function or declaration
J:\SA-MP servers\deathmatch\gamemodes\0-0.pwn(236) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

Well for starters missing opening { and closing } for the OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerInterior(playerid,0);
  if(gTeam[playerid] == TEAM_GREEN)
  {
    SetPlayerColor(playerid,0x33AA33AA); // green
    GameTextForPlayer(playerid,"~g~Let the fight begin",3000,5);
  }
  else if(gTeam[playerid] == TEAM_BLUE)
  {
    GameTextForPlayer(playerid,"~b~Let the fight begin",3000,5);
    SetPlayerColor(playerid,0x3333AAAA); // blue
  }
}
Do you have this at the top of your script under the #defines
pawn Код:
new gTeam[MAX_PLAYERS];
Are you assigning gTeam[playerid] a variable in your script.
Reply
#3

Yes
pawn Код:
static gTeam[MAX_PLAYERS];
Reply
#4

Added PAWN code to above
Reply
#5

can u tell us which line has errors?
Reply
#6

pawn Код:
if(gTeam[playerid] == TEAM_GREEN)
pawn Код:
else if(gTeam[playerid] == TEAM_BLUE)
Them two
Reply
#7

Lines of error?
Reply
#8

Quote:
Originally Posted by MenaceX^
Lines of error?
First Post and One before yours is the lines
Reply
#9

Show us your definition of TEAM_BLUE and TEAM_GREEN
Reply
#10

pawn Код:
#define TEAM_GREEN 1

#define TEAM_BLUE 2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)