[Error]Script GameMode
#1

Код:
public SetPlayerTeamFromClass(playerid, classid)
{
 	if (classid == 1
	{
		gTeam[playerid] = TEAM_VAGOS;
	}
 	if (classid == 2
	{
		gTeam[playerid] = TEAM_VAGOS;
	}
 	if (classid == 3
	{
		gTeam[playerid] = TEAM_VAGOS;
	}
 	if (classid == 4
	{
		gTeam[playerid] = TEAM_BALLAS;
	}
	if (classid == 5
	{
		gTeam[playerid] = TEAM_BALLAS;
	}
 	if (classid == 6
	{
		gTeam[playerid] = TEAM_BALLAS;
	}
 	if (classid == 7
	{
		gTeam[playerid] = TEAM_BALLAS;
	}
 	if (classid == 8
	{
		gTeam[playerid] = TEAM_AZTECAS;
	}
 	if (classid == 9
	{
		gTeam[playerid] = TEAM_AZTECAS;
	}
 	if (classid == 10
	{
		gTeam[playerid] = TEAM_AZTECAS;
	}
 	if (classid == 11
	{
		gTeam[playerid] = TEAM_GROVE;
	}
	if (classid == 12
	{
		gTeam[playerid] = TEAM_GROVE;
	}
	if (classid == 13
	{
		gTeam[playerid] = TEAM_GROVE;
	}
}
-Errors
Код:
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(170) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(174) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(178) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(182) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(186) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(190) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(194) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(198) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(202) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(206) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(210) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(214) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Mes documents\Downloads\Compressed\samp03asvr_R3_win32\gamemodes\waim.pwn(218) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


13 Errors.
code]
Reply
#2

You need to close the if-statement.

Wrong:
pawn Код:
if (classid == 13
Correct:
pawn Код:
if (classid == 13)
Reply
#3

Quote:
Originally Posted by Don Correlli
You need to close the if-statement.

Wrong:
pawn Код:
if (classid == 13
Correct:
pawn Код:
if (classid == 13)
also, im not sure but would u need a else if?

pawn Код:
if (classid == 13)
to

pawn Код:
else if (classid == 14)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)