10.10.2009, 15:44
Hey!!! I get these errors when i compile
Here is the script:
Im trying to make a script where if u get more than 3 kills, u go on a killing spree, if u get more than 10 kills, u get a minigun and if u get more than 20 kills u unlock /godcar and some cool vehicles!
Код:
C:\DOCUME~1\User\Desktop\server\GAMEMO~1\DEATHM~1.PWN(211) : error 017: undefined symbol "playerid" C:\DOCUME~1\User\Desktop\server\GAMEMO~1\DEATHM~1.PWN(211) : error 001: expected token: ")", but found ";" C:\DOCUME~1\User\Desktop\server\GAMEMO~1\DEATHM~1.PWN(211) : error 036: empty statement C:\DOCUME~1\User\Desktop\server\GAMEMO~1\DEATHM~1.PWN(211) : fatal error 107: too many error messages on one line
Код:
forward KillingSpree();
public KillingSpree()
{
if(GetPlayerScore(playerid) == 3; //this is line 211 where the errors are
{
new PlayerName[MAX_PLAYER_NAME],
string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "[Spree] %s is now on a killing spree!", PlayerName);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
}


. You should also add checking to make sure it's a valid death and a valid killer.