25.08.2018, 14:07
So I've got 4 errors in one line :
Full script:
PHP код:
C:\Users\fomina.janett1919\Desktop\test\gamemodes\test.pwn(7060) : error 012: invalid function call, not a valid address
C:\Users\fomina.janett1919\Desktop\test\gamemodes\test.pwn(7060) : warning 215: expression has no effect
C:\Users\fomina.janett1919\Desktop\test\gamemodes\test.pwn(7060) : error 001: expected token: ";", but found ")"
C:\Users\fomina.janett1919\Desktop\test\gamemodes\test.pwn(7060) : error 029: invalid expression, assumed zero
C:\Users\fomina.janett1919\Desktop\test\gamemodes\test.pwn(7060) : fatal error 107: too many error messages on one line
PHP код:
if(id1 != -1 && PlayerDamage[id1] != 0){ SendClientMessageToAll(-1, "*** 1st: %s with %d damage", PlayerName(id1), PlayerDamage[id1]);}
PHP код:
stock top3players(playerid){
new id1 = -1, id2 = -1, id3 = -1, pPlayerDamage = -100, string[115];
for(new i; i < MAX_PLAYERS; i++) if(PlayerDamage[i] > pPlayerDamage && PlayerDamage[i] != 0) id1 = i;
pPlayerDamage = -100;
for(new i; i < MAX_PLAYERS; i++) if(PlayerDamage[i] > pPlayerDamage && i != id1 && PlayerDamage[i] != 0) id2 = i;
pPlayerDamage = -100;
for(new i; i < MAX_PLAYERS; i++) if(PlayerDamage[i] > pPlayerDamage && i != id2 && i != id1 && PlayerDamage[i] != 0) id3= i;
SendClientMessageToAll(-1, "{e6b3ff}*** Top 3 Players by damage");
if(id1 != -1 && PlayerDamage[id1] != 0){ SendClientMessageToAll(-1, "*** 1st: %s with %d damage", PlayerName(id1), PlayerDamage[id1]);}
else if(id2 != -1 && PlayerDamage[id2] != 0){ SendClientMessageToAll(-1, "*** 2dn: %s with %d damage", PlayerName(id1), PlayerDamage[id2]);}
else if(id3 != -1 && PlayerDamage[id3] != 0){ SendClientMessageToAll(-1, "*** 3rd: %s with %d damage", PlayerName(id1), PlayerDamage[id3]);}
return 1;
}