server crashing -
FexTern - 14.06.2015
hi guys , well i have problem with my admin system , using /ar /tr /dr it crashes my server? why ? any ideas? i have replaced , trying to fix them many times....
/ar
Код:
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;
}
/tr
Код:
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;
}
/dr
Код:
CMD:dr(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], reportid, reason[128]/*, y,m,d,h,mi,s*/;
if(sscanf(params, "ds[128]", reportid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE,"{6347AA}[Error]:{FFFFFF} /dr [reportid] [Reason]");
if(reportid < 0 || reportid > 999) return SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!");
if(Reports[reportid][BeingUsed] == 0) return SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
Reports[reportid][BeingUsed] = 0;
if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
{
SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
Reports[reportid][ReportFrom] = 999;
return 1;
}
//getdate(y, m, d);
//gettime(h, mi, s);
format(string, sizeof(string), "AdmCmd: %s has Denied %s report Reason: %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),reason);
ABroadCast(COLOR_ORANGE, string, 2);
SendClientMessageEx(Reports[reportid][ReportFrom], 0x00FF0059, "______ .: REPORT DENIED :. ______");
format(string, sizeof(string), "Admin Name %s", GetPlayerNameEx(playerid));
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
format(string, sizeof(string), "Your Name %s", GetPlayerNameEx(Reports[reportid][ReportFrom]));
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
format(string, sizeof(string), "Reason: %s", reason);
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
//format(string, sizeof(string), "Correct Time&Date: %d/%d/%d %d:%d:%d [day/month/year hour:minute:second] ", d,m,y,h,mi,s);
//SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
SendClientMessageEx(Reports[reportid][ReportFrom], 0x00FF0059, "___________________________");
PlayerInfo[playerid][pTrashReport]++;
Reports[reportid][ReportFrom] = 999;
Reports[reportid][TimeToExpire] = 0;
strmid(Reports[reportid][Report], "None", 0, 4, 4);
}
return 1;
}
illrep the one who helps me !
Re: server crashing -
Konstantinos - 14.06.2015
Load crashdetect plugin:
https://github.com/Zeex/samp-plugin-...etect/releases
Compile with -d3 flag:
https://github.com/Zeex/samp-plugin-...ith-debug-info
Re-compile, start the server again and execute those commands. If the server crashes or get any output with [debug] prefix in server log, then post them here.
Re: server crashing -
FexTern - 14.06.2015
what i got when compiled it
Код:
Header size: 28824 bytes
Code size: 6216460 bytes
Data size: 83642964 bytes
Stack/heap size: 16000000 bytes; estimated max. usage: unknown, due to recursion
Total requirements:105888248 bytes
5 Warnings.
Re: server crashing -
Konstantinos - 14.06.2015
Some warnings affect the code during a run-time, you should fix them all just in case.
The above is not needed, what I want is the output of crashdetect in server log when a server crash/run time error occurs.
Re: server crashing -
FexTern - 14.06.2015
well about those warns , their like ehh how to say , it gives them automatically on places , you can replace them or any but it wont fix it
and as i added new map , other maps dosent laod anymore , deleted it , same , dont get it why it bugs it so much and how ?
Re: server crashing -
FexTern - 15.06.2015
well it dosent show what it is crashed by , last cmd used /ar after that crashed, just file ends , nothing else ,
Код:
[08:37:39] [zcmd] [Suicide Phantom]: /ar 2//last command used
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7, ©2005-2015 SA-MP Team