31.03.2012, 20:53
i add meds system on gm but error can u help me
E:\NEWFOL~1\SAMP03~2\SERVER~1\server\GAMEMO~1\cnr4 .pwn(2607) : warning 225: unreachable code
E:\NEWFOL~1\SAMP03~2\SERVER~1\server\GAMEMO~1\cnr4 .pwn(2614) : warning 219: local variable "string" shadows a variable at a preceding level
E:\NEWFOL~1\SAMP03~2\SERVER~1\server\GAMEMO~1\cnr4 .pwn(2623) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
Код:
public OnPlayerDeath(playerid, killerid, reason) { new string[120]; new pname[24]; GetPlayerName(playerid, pname, 24); new killername[24]; GetPlayerName(killerid, killername, 24); GivePlayerMoney(playerid, GetPlayerMoney(playerid)-1000); SendClientMessage(playerid, 0xF12586479, "You have been charged $1,000 for medical services."); format(string, sizeof(string), "[DEATH] %s(%d) killed himself.", pname, playerid); SetPlayerWantedLevel(playerid, 0); return 1; HideDraw(playerid); SendDeathMessage(killerid, playerid, reason); SetPlayerColor(playerid, GREY); SetPlayerWantedLevel(playerid, 0); if(reason <= 46 && hit[playerid] != 0) { new string[256]; format(string, sizeof(string), "%s (%i) killed %s (%i) and recieved $%i for a completed hit", ReturnPlayerName(killerid), killerid, ReturnPlayerName(playerid), playerid, hit[playerid]); SendClientMessageToAll(COLOR_MSG, string); GivePlayerMoney(killerid, hit[playerid]); GivePlayerMoney(hiter[playerid], GetPlayerMoney(hiter[playerid])-hit[playerid]); hit[playerid] = 0; } else if(hit[playerid] != 0) { new string[256]; format(string, sizeof(string), "The hit on %s (%i) has been cancelled (died)", ReturnPlayerName(playerid), playerid); SendClientMessageToAll(COLOR_MSG, string); hit[playerid] = 0; } IsSpawned[playerid] =0; if(HaveGPS[playerid]) { KillTimer(GPSTimer[playerid]); HaveGPS[playerid] = false; GPSTimer[playerid] = 0; } return true; }
E:\NEWFOL~1\SAMP03~2\SERVER~1\server\GAMEMO~1\cnr4 .pwn(2607) : warning 225: unreachable code
E:\NEWFOL~1\SAMP03~2\SERVER~1\server\GAMEMO~1\cnr4 .pwn(2614) : warning 219: local variable "string" shadows a variable at a preceding level
E:\NEWFOL~1\SAMP03~2\SERVER~1\server\GAMEMO~1\cnr4 .pwn(2623) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.