Server crashing
#1

Hello guys.. i have a question, what you think it might be crashing the server because after i use /ar several times it just crashes ( ex at 65 reports ) and goes off , okay i have been trying to overwrite it and anything but it keeps on crashing i checked the log last thing was /ar after that clean page, if i could get some help to fix it i would apreciate that

( sorry if made mistakes in my grammar )

thank you all

( /ar command )

pawn Код:
CMD:ar(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new string[128], reportid;
        if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ar [reportid]");

        if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, "   Report ID not below 0 or above 999!"); return 1; }
        if(Reports[reportid][BeingUsed] == 0)
        {
            SendClientMessageEx(playerid, COLOR_GREY, "   That report ID is not being used!");
            return 1;
        }
        if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
        {
            SendClientMessageEx(playerid, COLOR_GREY, "   The reporter has disconnected !");
            Reports[reportid][ReportFrom] = 999;
            Reports[reportid][BeingUsed] = 0;
            return 1;
        }
        format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
        ABroadCast(COLOR_ORANGE, string, 2);
        AddReportToken(playerid); // Report Tokens
        format(string, sizeof(string), "%s has accepted your report and is reviewing it, you can /reply to send messages to the admin reviewing your report.", GetPlayerNameEx(playerid));
        SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
        PlayerInfo[playerid][pAcceptReport]++;
        Reports[reportid][ReplyTimerr] = SetTimerEx("ReplyTimer", 30000, 0, "d", reportid);
        Reports[reportid][CheckingReport] = playerid;
        Reports[reportid][BeingUsed] = 0;
        Reports[reportid][TimeToExpire] = 0;
        strmid(Reports[reportid][Report], "None", 0, 4, 4);
    }
    return 1;
}
Reply
#2

Run crashdetect plugin with -d3 parameters so you will find out in which line the problem is.
Reply
#3

the errors i got
pawn Код:
[10:36:08] *** Audio_SetPack: Error opening audio.ini
pawn Код:
[10:36:27] [debug] Run time error 4: "Array index out of bounds"
[10:36:27] [debug]   Accessing element at index 999 past array upper bound 500
[10:36:27] [debug] Backtrace (most recent call first):
[10:36:27] [debug] #0  0006a8bc in OnPlayerStateChange () from PHRP.amx
[10:36:28] Incoming connection: 112.209.223.175:60859
[10:36:29] [join] Chito_Mirandog has joined the server (2:112.209.223.175)
[10:36:30] [zcmd] [Marina Mayfield]: /jetpack
[10:36:35] Acres_Jackson has logged in.
[10:36:35]  Loading Acres_Jackson's vehicles.
[10:36:35]  Loading all vehicles mods.
[10:36:35] [zcmd] [Marina Mayfield]: /aduty
[10:36:35] [debug] Run time error 4: "Array index out of bounds"
[10:36:35] [debug]   Accessing element at index 999 past array upper bound 500
[10:36:35] [debug] Backtrace (most recent call first):
[10:36:35] [debug] #0  0006a8bc in OnPlayerStateChange () from PHRP.amx
[10:36:36] Chito_Mirandog has logged in.
[10:36:36]  Loading Chito_Mirandog'
s vehicles.
[10:36:36]  Loading all vehicles mods.
[10:36:36] [debug] Run time error 4: "Array index out of bounds"
[10:36:36] [debug]   Accessing element at index 999 past array upper bound 500
[10:36:36] [debug] Backtrace (most recent call first):
[10:36:36] [debug] #0  0006a8bc in OnPlayerStateChange () from PHRP.amx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)