2 Compling Errors - 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: 2 Compling Errors (
/showthread.php?tid=63883)
2 Compling Errors -
acade - 31.01.2009
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.
Re: 2 Compling Errors -
ShizNator - 31.01.2009
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
Are you assigning gTeam[playerid] a variable in your script.
Re: 2 Compling Errors -
acade - 31.01.2009
Yes
pawn Код:
static gTeam[MAX_PLAYERS];
Re: 2 Compling Errors -
acade - 01.02.2009
Added PAWN code to above
Re: 2 Compling Errors -
flames - 01.02.2009
can u tell us which line has errors?
Re: 2 Compling Errors -
acade - 01.02.2009
pawn Код:
if(gTeam[playerid] == TEAM_GREEN)
pawn Код:
else if(gTeam[playerid] == TEAM_BLUE)
Them two
Re: 2 Compling Errors -
MenaceX^ - 01.02.2009
Lines of error?
Re: 2 Compling Errors -
acade - 01.02.2009
Quote:
Originally Posted by MenaceX^
Lines of error?
|
First Post and One before yours is the lines
Re: 2 Compling Errors -
LarzI - 01.02.2009
Show us your definition of TEAM_BLUE and TEAM_GREEN
Re: 2 Compling Errors -
acade - 01.02.2009
pawn Код:
#define TEAM_GREEN 1
#define TEAM_BLUE 2