16.01.2018, 02:11
Can anybody help me figure out why my server keeps crashing
CrashDetect showed these errors but I'm not sure what they mean
GetAllLog:
CMD:gall
OnPlayerCommandText:
Thanks in advance if anyone takes the time to help a newb out
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
Код:
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(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; }
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { SetTimerEx("ResetCommandCount", SpamLimit, false, "i", playerid); return 0; }