PDA

View Full Version : [FIXED]I have errors help me


TheKnown
16/09/2015, 01:19 PM
(878) : error 001: expected token: ")", but found ";"
(880) : warning 217: loose indentation
(885) : warning 209: function "OnPlayerSpawn" should return a value
(886) : error 010: invalid function or declaration
(893) : error 010: invalid function or declaration
(903) : error 054: unmatched closing brace ("}")
(904) : error 010: invalid function or declaration


All errors are located here:


public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == SerialKiller && GetPlayerScore(playerid) <= 1200)return (SendClientMessage(playerid, COLOR_RED, "You Need 1200 Score To Use Serial Killer");
{
GivePlayerWeapon(playerid, 9, 500);
GivePlayerWeapon(playerid, 37, 500);
GivePlayerWeapon(playerid, 33, 500);
GivePlayerWeapon(playerid, 24, 500);
SetPlayerArmour(playerid, 100.0);
}
if(gTeam[playerid] == Cops)
{
GivePlayerWeapon(playerid, 3, 500);
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 17, 10);
}
if(gTeam[playerid] == Army && GetPlayerScore(playerid) <= 1700)return (SendClientMessage(playerid, COLOR_RED, "You Need 1700 Score To Use Army");
{
GivePlayerWeapon(playerid, 4, 500);
GivePlayerWeapon(playerid, 16, 500);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 32, 500);
GivePlayerWeapon(playerid, 33, 500);
GivePlayerWeapon(playerid, 26, 500);
SetPlayerArmour(playerid, 50.0);

}
return 1;
}

Infinity
16/09/2015, 01:21 PM
Your first if statement is lacking a closing bracket before the semicolon.

TheKnown
16/09/2015, 01:30 PM
fixed it!
Thanks!