Server Restart problem +rep for help -
kesarthakur - 02.01.2015
My server is restarting automatically after a few minutes
i got this logs through crash detect
[10:36:49] [debug] Server crashed while executing usf.amx
[10:36:49] [debug] AMX backtrace:
[10:36:49] [debug] #0 00000032 in ?? (57, 0, 1838804

from usf.amx
[10:36:49] [debug] #1 000148d4 in ?? (57, 0, 1420184209, 0, 18389140, 197628, 4, 0, 0, 0, ... <2 arguments>) from usf.amx
[10:36:49] [debug] #2 00000032 in public Streamer_OnPlayerDisconnect () from usf.amx
[10:36:49] [debug] #3 native CallLocalFunction () from samp03svr
[10:36:49] [debug] #4 0001d658 in public Itter_OnPlayerDisconnect (0, 2) from usf.amx
[10:36:49] [debug] #5 native CallLocalFunction () from samp03svr
[10:36:49] [debug] #6 0001ca10 in ?? (0, 2) from usf.amx
[10:36:49] [debug] #7 0000b8b4 in public SSCANF_OnPlayerDisconnect (0, 2) from usf.amx
[10:36:49] [debug] #8 00000434 in public OnPlayerDisconnect (0, 2) from usf.amx
[10:36:49] [debug] #9 native Kick () from samp03svr
[10:36:49] [debug] #10 000557a8 in ?? (0) from usf.amx
[10:36:49] [debug] #11 00017100 in public TF_TimerTick () from usf.amx
please help me to fix this
Re: Server Restart problem +rep for help -
dominik523 - 02.01.2015
Can you please post the code under OnPlayerDisconnect from "usf" script?
Re: Server Restart problem +rep for help -
kesarthakur - 02.01.2015
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
switch (PlayerInfo[playerid][inDMZone])
{
case 3:
{
gMINIPlayers--;
}
case 4:
{
gGDMPlayers--;
}
case 5:
{
gSNOWPlayers--;
}
}
PlayerInfo[playerid][Minutes] += gettime() - gOnlineTime[playerid];
players_connected--;
if (PlayerInfo[playerid][GodEnabled] == 1)
{
Delete3DTextLabel(Text3D:godtext[playerid]);
PlayerInfo[playerid][GodEnabled] = 0;
}
if(OnDuty[playerid] == 1)
{
Delete3DTextLabel(Text3D:adminlabel[playerid]);
}
//vehicle
DestroyVehicle(PlayerInfo[playerid][pSpawnVehicle]);
PlayerInfo[playerid][pSpawnVehicle] = INVALID_VEHICLE_ID;
//----------
if (IsBeingSpeced[playerid] == 1)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (spectatorid[i] == playerid)
{
TogglePlayerSpectating(i, false);
}
}
}
new string[250];
Iter_Remove(ON_Player, playerid);
if( Minigamer_{ playerid } == true )
{
if( inProgress > 1 )
{
format( string, sizeof string, "[DGW] {%06x}%s "WHITE"has dropped out of "RED"Don't Get Wet minigame, "WHITE"rank "GREY"%d", GetPlayerColor(playerid) >>> 8, GetName( playerid ), Iter_Count(_Minigamer) );
SendClientMessageToAll( -1, string );
Iter_Remove(_Minigamer, playerid );
Minigamer_{ playerid } = false;
if( Iter_Count(_Minigamer) < 2 )
{
foreach(_Minigamer, i) MinigameWinner( i );
}
}
else
{
Iter_Remove(_Minigamer, playerid);
Minigamer_{ playerid } = false;
}
}
if (PlayerInfo[playerid][VIP] >= 1)
{
Delete3DTextLabel(VIPLabel[playerid]);
}
SetPlayerHealth(playerid, 100.0);
if (PlayerInfo[playerid][Spawned] == 1)
{
SaveStats(playerid);
}
//------------------------------
// Notification (Mute System)..
//------------------------------
if (PlayerInfo[playerid][Muted] >= 1)
{
PlayerInfo[playerid][Muted] = 0;
}
PlayerInfo[ playerid ][ Muted ] = 0;
//=====================================
InMeeting[playerid] = 0;
new str[256];
switch(reason)
{
case 0: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Crash){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );
case 1: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Quit){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );
case 2: format( str, sizeof(str), ""GREY"<"RED"-"GREY"> {%06x}%s(%d) {87CEFA}has disconnected "RED"(Kick/Ban){87CEFA}. "GREY"[%d/%d]", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, players_connected, GetMaxPlayers() );
}
SendClientMessageToAll( -1, str );
return 1;
}
Re: Server Restart problem +rep for help -
dominik523 - 02.01.2015
The best thing you could do for now is debugging like this:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
switch (PlayerInfo[playerid][inDMZone])
{
case 3:
{
gMINIPlayers--;
}
case 4:
{
gGDMPlayers--;
}
case 5:
{
gSNOWPlayers--;
}
}
PlayerInfo[playerid][Minutes] += gettime() - gOnlineTime[playerid];
players_connected--;
printf("1");
if (PlayerInfo[playerid][GodEnabled] == 1)
{
Delete3DTextLabel(Text3D:godtext[playerid]);
PlayerInfo[playerid][GodEnabled] = 0;
}
if(OnDuty[playerid] == 1)
{
Delete3DTextLabel(Text3D:adminlabel[playerid]);
}
printf("2");
...
Print anything between snippets of code so you will be able to see which snippet doesn't work right.
Re: Server Restart problem +rep for help -
kesarthakur - 02.01.2015
the prob is with 1st snippet above print 1
maybe with this line
PlayerInfo[playerid][Minutes] += gettime() - gOnlineTime[playerid];
Re: Server Restart problem +rep for help -
muzammilfreeman - 02.01.2015
Better to change version might help you...