22.03.2015, 19:17
pawn Код:
[20:54:20] [debug] Run time error 4: "Array index out of bounds"
[20:54:20] [debug] Accessing element at negative index -1
[20:54:20] [debug] AMX backtrace:
[20:54:20] [debug] #0 000781c0 in public OnPlayerEnterDynamicCP (3, 5) from PerfectDM.amx
pawn Код:
if(checkpointid == Player[playerid][MissionBankTimerAndCP])
{
if(Player[playerid][PlayerBankRob] > 0)
{
DestroyDynamicCP(Player[playerid][MissionBankTimerAndCP]);
DestroyDynamic3DTextLabel(Player[playerid][MissionBank3DText]);
TogglePlayerDynamicCP(playerid, Server[MissionBankCP], 1);
UpdateBank(playerid, Player[playerid][PlayerBankRob]);
Message(-1, Red, "[Bank] >> "white"!הצליח לשדוד את הבנק \"%s\" השחקן", GetName(Player[playerid][MissionBankTargetID]), GetName(playerid));
Message(-1, Red, "[Bank] >> "green"$%s "white":סכום השוד", GetNum(Player[playerid][PlayerBankRob]));
GivePlayerMoney(playerid, -Player[playerid][PlayerBankRob]);
return Player[playerid][PlayerBankRob] = 0, 1;
}
return 1;
}