Onplayercommandrececieved = Server Restarts... -
ManGoe - 12.07.2015
Code:
[00:27:26] [debug] Server crashed while executing *****.amx
[00:27:26] [debug] AMX backtrace:
[00:27:26] [debug] #0 native fclose () [004056f0] from samp-server.exe
[00:27:26] [debug] #1 0007b094 in ?? () from *****.amx
[00:27:26] [debug] #2 00130df0 in public OnPlayerCommandReceived () from *****.amx
[00:27:26] [debug] #3 native CallLocalFunction () [00474110] from samp-server.exe
[00:27:26] [debug] #4 00003f20 in public OnPlayerCommandText () from *****.amx
[00:27:26] [debug] System backtrace:
[00:27:26] [debug] #0 004056fd in ?? () from D:\TCAFiles\Users\*****\9384\samp-server.exe
[00:27:26] [debug] #1 72e839e2 in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #2 72e85e26 in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #3 72e7bf3f in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #4 72e83a0e in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #5 0047441e in ?? () from D:\TCAFiles\Users\*****\9384\samp-server.exe
[00:27:26] [debug] #6 004010b6 in ?? () from D:\TCAFiles\Users\*****\9384\samp-server.exe
[00:27:26] [debug] #7 72e839e2 in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #8 72e85e26 in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #9 72e7bf3f in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #10 72e83a0e in ?? () from D:\TCAFiles\Users\*****\9384\plugins\crashdetect.DLL
[00:27:26] [debug] #11 0046dbc0 in ?? () from D:\TCAFiles\Users\*****\9384\samp-server.exe
[00:27:26] [debug] #12 004528f0 in ?? () from D:\TCAFiles\Users\*****\9384\samp-server.exe
[00:27:26] [debug] #13 772038aa in ?? () from C:\Windows\SysWOW64\ntdll.dll
[00:27:26] [debug] #14 0049d629 in ?? () from D:\TCAFiles\Users\shreyr\9384\samp-server.exe
[00:27:26] [debug] #15 0045b3aa in ?? () from D:\TCAFiles\Users\shreyr\9384\samp-server.exe
[00:27:26] [debug] #16 74f114ab in ?? () from C:\Windows\syswow64\KERNELBASE.dll
[00:27:26] [debug] #17 74f114de in ?? () from C:\Windows\syswow64\KERNELBASE.dll
-VortexHost - Hosting - Windows - OS.
Re: Onplayercommandrececieved = Server Restarts... -
kalanerik99 - 12.07.2015
Show your
Code:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
...
return 1;
}
Re: Onplayercommandrececieved = Server Restarts... -
ManGoe - 12.07.2015
Code:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(playerData[playerid][canUseCommands] || playerData[playerid][playerLevel] >= 1)
{
if(playerData[playerid][hasSpawned] || playerData[playerid][playerLevel] >= 1)
{
playerData[playerid][canUseCommands] = false;
playerData[playerid][commandTimer] = SetTimerEx("command", 1020, false, "i", playerid);
new loggingString[256];
format(loggingString, sizeof(loggingString), "%s used command: %s", playerData[playerid][playerNamee], cmdtext);
writeInLog("commandLog.html", loggingString);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You cannot use commands while you're not spawned.");
return 0;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Please wait before using another command.");
return 0;
}
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success){
if (!success) return SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Unknown command. Type {FFDC2E}/cmds {FFFFFF}for a list of commands or {FFDC2E}/help {FFFFFF}for guides.");
return 1;
}
Re: Onplayercommandrececieved = Server Restarts... -
kalanerik99 - 12.07.2015
Does it compile ok?
Re: Onplayercommandrececieved = Server Restarts... -
kalanerik99 - 12.07.2015
Code:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(playerData[playerid][canUseCommands] == false || playerData[playerid][playerLevel] <= 0) return SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Please wait before using another command.");
if(playerData[playerid][hasSpawned] == false || playerData[playerid][playerLevel] <= 0)return SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You cannot use commands while you're not spawned.");
playerData[playerid][canUseCommands] = false;
playerData[playerid][commandTimer] = SetTimerEx("command", 1020, false, "i", playerid);
new loggingString[256];
format(loggingString, sizeof(loggingString), "%s used command: %s", playerData[playerid][playerNamee], cmdtext);
writeInLog("commandLog.html", loggingString);
return 1;
}
Try this one
Re: Onplayercommandrececieved = Server Restarts... -
ManGoe - 12.07.2015
Wait but it runs fine on my and my friend's localhost.
-
Sew_Sumi - 12.07.2015
What's it say in the server log when it does restart.
Nativechecker should really only be used later on when you've exhausted a few basic checks.
Re: Onplayercommandrececieved = Server Restarts... -
Vince - 12.07.2015
The stacktrace is specifically referring to fclose, so it only seems logical that the culprit would be writeInLog, no?
Re: Onplayercommandrececieved = Server Restarts... -
ManGoe - 12.07.2015
[11:55:54] [debug] #0 native fclose () [004056f0] from samp-server.exe
BTW. Vince yes.. you are right what to do now?
Re: Onplayercommandrececieved = Server Restarts... -
ManGoe - 28.09.2016
Never mind, fixed it putting latest samp update.
Permission issues too.