03.01.2012, 19:19
I want to make Team Cop skins only for players who has ">=300" score
And i get errors when i compile... please help.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
SetPlayerTeamFromClass(playerid, classid);
return 1;
}
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0 || classid == 1 || classid == 2 || classid == 3 ||classid == 4|| classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9)
{
SetupPlayerForClassSelection(playerid);
GameTextForPlayer(playerid, "~w~CIVILLIAN", 500, 3);
gTeam[playerid] = 0;
}
if(classid == 10 || classid == 11 || classid == 12 || classid == 13 || classid == 14)
{
SetupPlayerForClassSelection(playerid);
GameTextForPlayer(playerid, "~y~ZOMBIE", 500, 3);
gTeam[playerid] = 1;
}
if(classid == 15 || classid == 16 || classid == 17 || classid == 18 || classid == 19 || classid == 20 || classid == 21 || classid == 22 || classid == 23)
{
if(GetPlayerScore(playerid) >= 300)
(
SetupPlayerForClassSelection(playerid);
GameTextForPlayer(playerid, "~b~THE LAW", 500, 3);
gTeam[playerid] = 2;
)
else
(
SendClientMessage(playerid, COLOR_RED, "YOU NEED TO BE ABOVE 300 SCORE TO BE A COP");
)
}
}
pawn Код:
(1179 -- 1180) : error 001: expected token: ")", but found ";"
(1181) : warning 217: loose indentation
(1183) : warning 217: loose indentation
(1183) : error 029: invalid expression, assumed zero
(1183 -- 1184) : warning 215: expression has no effect
(1184) : error 001: expected token: ";", but found "else"
(1184) : error 029: invalid expression, assumed zero
(1184) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.