SA-MP Forums Archive
/ar making server crash - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /ar making server crash (/showthread.php?tid=275497)



/ar making server crash - WG Chinn - 09.08.2011

im running a Linux server and now for some reason when you type /ar [reportid] it just 100% crashes and i have to hurry up and login and restart the server the CMD im using with im cire isnt important is
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;
}

CMD:tr(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new string[128], reportid;
        if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /tr [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 trashed the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]));
        ABroadCast(COLOR_ORANGE, string, 2);
        format(string, sizeof(string), "%s has marked your report invalid. It will not be reviewed. Please check /reporttips", GetPlayerNameEx(playerid));
        SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
        PlayerInfo[playerid][pTrashReport]++;
        Reports[reportid][ReportFrom] = 999;
        Reports[reportid][BeingUsed] = 0;
        Reports[reportid][TimeToExpire] = 0;
        strmid(Reports[reportid][Report], "None", 0, 4, 4);
    }
    return 1;
}



Re: /ar making server crash - Vince - 09.08.2011

Are you sure you're not going out of bounds somewhere with your arrays?


Re: /ar making server crash - Joco5 - 09.08.2011

Try make this,
CMD:AR.......
#pragma unused params
...........
OR CMD:AR.......
AND OTHER DONT ADD }
I HOPE IT WILL WORK NORMAL


Re: /ar making server crash - WG Chinn - 09.08.2011

i have no idea what your meaning! haha but it always wored before. i might test it on wondows real quick o see what happens


Re: /ar making server crash - sleepysnowflake - 09.08.2011

Dude, do you use the .iso version of sscanf, also the server crash log ?


Re: /ar making server crash - WG Chinn - 10.08.2011

yes i have a crash log and it has NOTHING i check the server log and nothig either it just stopes....? and yes i do use all linux plugins im not that dumb lmao