01.04.2013, 06:38
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason); // Shows the kill in the killfeed/deathlog/death window
if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
{
pScore[killerid]++;
SetPlayerScore(killerid, pScore[killerid]);
pCash[killerid] += 100;
GivePlayerMoney(killerid, 100);
}
// Outside the check, handle stuff for playerid
// if killerid was INVALID_PLAYER_ID the player killed themselves (i.e. falling)
pDeaths[playerid]++;
pCash[playerid] -= 100;
pScore[playerid]--;
SetPlayerScore(playerid, pScore[playerid]);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, pCash[playerid]);
return 1;
}
Код:
C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(159) : error 017: undefined symbol "pScore" C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(159) : warning 215: expression has no effect C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(159) : error 001: expected token: ";", but found "]" C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(159) : error 029: invalid expression, assumed zero C:\DOCUME~1\cla\Desktop\SAMP\SAMP03~1\GAMEMO~1\Malta.pwn(159) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.

