Server crashing on login - CrashDetect
#1

Can anybody help me figure out why my server keeps crashing
CrashDetect showed these errors but I'm not sure what they mean

Код:
[03:19:28] [join] Test1 has joined the server (0:192.168.0.14)
[03:20:08] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[03:20:08] sscanf warning: No default value found.
[03:20:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[03:20:19] sscanf warning: Strings without a length are deprecated, please add a destination size.
[03:20:55] [debug] Server crashed while executing CNR.amx
[03:20:55] [debug] AMX backtrace:
[03:20:55] [debug] #0 native fwrite () from samp-server.exe
[03:20:55] [debug] #1 00048624 in public GetAllLog (17614644) from CNR.amx
[03:20:55] [debug] #2 00066ff4 in public cmd_gall (0, 17353244) from CNR.amx
[03:20:55] [debug] #3 native CallLocalFunction () from samp-server.exe
[03:20:55] [debug] #4 000387e0 in public OnPlayerCommandText (0, 17353220) from CNR.amx
[03:20:55] [debug] Native backtrace:
[03:20:55] [debug] #0 77d8fee3 in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[03:20:55] [debug] #1 00498bb8 in ?? () from samp-server.exe
[03:20:55] [debug] #2 0040531e in ?? () from samp-server.exe
GetAllLog:
Код:
public GetAllLog(string[])
{
	new entry[128];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("/Logs/gall.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}
CMD:gall
Код:
CMD:gall(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 2)
    {
    new Float:x;
    new Float:y;
    new Float:z;
    new string[128];
    new pName[24];
    GetPlayerName(playerid,pName,128);
    format(string, sizeof(string), "Admin %s (%d) has teleported all players to his location.",pName,playerid);
    SendClientMessageToAll(red,string);
    for(new i=0; i<MAX_PLAYERS; i++)
    if(IsPlayerConnected(i)) {
    GetPlayerPos(playerid,x,y,z);
    SetPlayerPos(i,x,y,z);
    GetAllLog(string);
    }
    return true;
    }
    else return 0;
}
OnPlayerCommandText:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    SetTimerEx("ResetCommandCount", SpamLimit, false, "i", playerid);
	return 0;
}
Thanks in advance if anyone takes the time to help a newb out
Reply
#2

Looks like it's coming from fwrite, likely an invalid file handle. This means it can't find a file/directory most likely, search for "fopen".
Reply
#3

Quote:
Originally Posted by Abagail
Посмотреть сообщение
Looks like it's coming from fwrite, likely an invalid file handle. This means it can't find a file/directory most likely, search for "fopen".
I renamed one of the folders and the problem seems to be fixed, its been 30 minutes and no crashes so far..

Thank you! +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)