15.08.2018, 15:47
So I made something easy , a script which tells everyone top 3 players every 15 minutes (by damage).
It was all inside a timer which as I said, every 15 minutes there will be again another top 3 players by damage. I in half created it but also used taking a look at some codes already done at samp forums. (Just to get a better idea and some examples to elaborate better what I want to make), I get only 1 error which is
Line 5521:
I'm not really used to make kind of stuff, so I really wonder... if I did it correctly. Would be really pleased if you fix this code up or tell me whats wrong with a tip to make it work.
Код:
forward CountPlayerDamage(playerid); public CountPlayerDamage(playerid) { new TopString[3][128], string[250]; SendClientMessageToAll(-1, "{e6b3ff}*** Top 3 Players by damage"); SendClientMessageToAll(-1, TopString[0]); SendClientMessageToAll(-1, TopString[1]); SendClientMessageToAll(-1, TopString[2]); for(new i = 0; i != p; ++i) { if(i == 0) format(TopString[0], 128, "{e6b3ff}*** 1st: %s %d damage", PlayerName[i], PlayerDamage[i]); else if(i == 1) format(TopString[1], 128, "{e6b3ff}*** 2nd: %s %d damage", PlayerName[i], PlayerDamage[i]); else if(i == 2) format(TopString[2], 128, "{e6b3ff}*** 3rd: %s %d damage", PlayerName[i], PlayerDamage[i]); } format(string, sizeof(string), "{e6b3ff}*** Your damage was %.2f, made in 15 minutes.", PlayerDamage[playerid]); SendClientMessage(playerid, -1, string); PlayerDamage[playerid] = 0; return 1; }
Код:
C:\Users\fomina.janett1919\Desktop\gtadm\gamemodes\gtadm.pwn(5521) : error 017: undefined symbol "p" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
for(new i = 0; i != p; ++i) {