SA-MP Forums Archive
problem with script - 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)
+--- Thread: problem with script (/showthread.php?tid=563340)



problem with script - Anfaradus - 15.02.2015

Problems:

pawn Код:
D:\SA-MP GameModes\mano gamemodas\gamemodes\Untitled.pwn(27) : error 017: undefined symbol "gTeam"
D:\SA-MP GameModes\mano gamemodas\gamemodes\Untitled.pwn(27) : warning 215: expression has no effect
D:\SA-MP GameModes\mano gamemodas\gamemodes\Untitled.pwn(27) : error 001: expected token: ";", but found "]"
D:\SA-MP GameModes\mano gamemodas\gamemodes\Untitled.pwn(27) : error 029: invalid expression, assumed zero
D:\SA-MP GameModes\mano gamemodas\gamemodes\Untitled.pwn(27) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Lines:

Код:
forward SetZone(playerid);
public SetZone(playerid)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
GivePlayerMoney(playerid,6000);
SendClientMessage(playerid, 0x00FF007A,"You've capture the zone and receive 500 $ and 5 score");
if(gTeam[playerid] == TEAM_USA); // line 27
{
	GangZoneShowForAll(USA,COLOR_USA);
}
if(gTeam[playerid] == TEAM_UK)
{
	GangZoneShowForAll(USA,COLOR_UK);
}
if(gTeam[playerid] == TEAM_RUSSIA)
{
	GangZoneShowForAll(USA,COLOR_RUSSIA);
}



Re: problem with script - Golf - 15.02.2015

PHP код:
new gTeam[MAX_PLAYERS]; 



Re: problem with script - electrux - 15.02.2015

if(gTeam[playerid] == TEAM_USA);

the statement has a semicolon ( ; ) at the end... remove that semicolon as well