Server has crashed
#1

EDIT: If you have the same problem, see here https://sampforum.blast.hk/showthread.php?tid=639742

In the last week every day my server crashes two-three times... The crashdetec plugin gives me this information:
Код:
[22:26:45] [debug] Server crashed while executing bgmod.amx
[22:26:45] [debug] AMX backtrace:
[22:26:45] [debug] #0 00000029 in ?? () at <unknown file>:0
[22:26:45] [debug] #1 00000029 in public FC_OnPlayerDisconnect () at <unknown file>:0
[22:26:45] [debug] #2 native CallLocalFunction () from samp03svr
[22:26:45] [debug] #3 0002efe4 in public SSCANF_OnPlayerDisconnect (playerid=16, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\fuckcleo.inc:219
[22:26:45] [debug] #4 00025e9c in ?? (... <2 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\sscanf2.inc:229
[22:26:45] [debug] #5 0001821c in public OnPlayerDisconnect (playerid=16, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:661
[22:26:45] [debug] #6 native Kick () from samp03svr
[22:26:45] [debug] #7 00304e6c in public GPD_OnDialogResponse (playerid=16, dialogid=2012, response=0, listitem=-1, inputtext[]=@0184c668 "") at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:34476
[22:26:45] [debug] #8 native CallLocalFunction () from samp03svr
[22:26:45] [debug] #9 00030088 in ?? (... <5 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\GPDID.inc:54
[22:26:45] [debug] #10 0001bb1c in public OnDialogResponse (playerid=16, dialogid=2012, response=0, listitem=-1, inputtext[]=@0184c664 "") at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:2257
This line in gamemode is:
Код:
if(!response && playerid != INVALID_PLAYER_ID) return Kick(playerid);
The code around this line is:
Код:
if(dialogid == dlogin)
    {
    new string[100];
        if(!response && playerid != INVALID_PLAYER_ID) return Kick(playerid);
        if(response && playerid != INVALID_PLAYER_ID)
        {
            if(!strcmp(inputtext,pInfo[playerid][Pass]))
            {
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
                SetPlayerScore(playerid,pInfo[playerid][Scores]);
                SetPlayerCash(playerid,pInfo[playerid][Money]);
                LoadAccount(playerid);
Please can someone help me? Where is the problem?

Thanks in advance!
Reply
#2

Remove that && playerid != INVALID_PLAYER_ID
Reply
#3

Firstly, it was without it and it crashed too with this reason:
Код:
[14:13:09] [debug] Server crashed while executing bgmod.amx
[14:13:09] [debug] AMX backtrace:
[14:13:09] [debug] #0 00000029 in ?? () at <unknown file>:0
[14:13:09] [debug] #1 00000029 in public FC_OnPlayerDisconnect () at <unknown file>:0
[14:13:09] [debug] #2 native CallLocalFunction () from samp03svr
[14:13:09] [debug] #3 0002efe4 in public SSCANF_OnPlayerDisconnect (playerid=36, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\fuckcleo.inc:219
[14:13:09] [debug] #4 00025e9c in ?? (... <2 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\sscanf2.inc:229
[14:13:09] [debug] #5 0001821c in public OnPlayerDisconnect (playerid=36, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:661
[14:13:09] [debug] #6 native Kick () from samp03svr
[14:13:09] [debug] #7 00308e5c in public FC_OnPlayerUpdate (playerid=36) at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:34788
[14:13:09] [debug] #8 native CallLocalFunction () from samp03svr
[14:13:09] [debug] #9 0002ebc0 in ?? (... <1 argument>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\fuckcleo.inc:196
[14:13:09] [debug] #10 0001b320 in public OnPlayerUpdate (playerid=36) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:2038
Код:
 new string[100];
        if(GetPlayerPing(playerid) >= 350)
        {
                format(string, sizeof(string), "SERVER: %s беше кикнат от сървъра. [Причина: Висок пинг!]", PlayerName(playerid));
                SendClientMessageToAll(COLOR_RED, string);
				Kick(playerid);
        }
I thought that the problem was that the server was kicking an invalid playeid so i put everywhere where I have Kick(playerid) a check if it is invalid or not.
Reply
#4

Show your OnPlayerDisconnect
Reply
#5

Код:
public OnPlayerDisconnect(playerid, reason)
{
    AntiDeAMX();
	new var0[80];
	new year, month, day;
	getdate(year, month, day);
	new string[128];
	format(string, sizeof(string), "%i/%i/%i", month, day, year);
	switch(reason) {
		case 0:
			format(var0, 100, "{FFFFFF}%s[ID:%i] {E60000}излезе от сървъра. {FFFFFF}(Crash)", PlayerName(playerid), playerid);
		case 1:
			format(var0, 100, "{FFFFFF}%s[ID:%i] {E60000}излезе от сървъра. {FFFFFF}(Leave)", PlayerName(playerid), playerid);
		case 2:
			format(var0, 100, "{FFFFFF}%s[ID:%i] {E60000}беше кикнат от сървъра. {FFFFFF}(Kick)", PlayerName(playerid), playerid);
	}
	SendClientMessageToAll(0xFFFF00AA, var0);
	if(logged[playerid] == 1)
	{
	GetPlayerWeaponData(playerid, 0, pInfo[playerid][Weapon0], pInfo[playerid][Ammo0]);
    GetPlayerWeaponData(playerid, 1, pInfo[playerid][Weapon1], pInfo[playerid][Ammo1]);
    GetPlayerWeaponData(playerid, 2, pInfo[playerid][Weapon2], pInfo[playerid][Ammo2]);
    GetPlayerWeaponData(playerid, 3, pInfo[playerid][Weapon3], pInfo[playerid][Ammo3]);
    GetPlayerWeaponData(playerid, 4, pInfo[playerid][Weapon4], pInfo[playerid][Ammo4]);
    GetPlayerWeaponData(playerid, 5, pInfo[playerid][Weapon5], pInfo[playerid][Ammo5]);
    GetPlayerWeaponData(playerid, 6, pInfo[playerid][Weapon6], pInfo[playerid][Ammo6]);
    GetPlayerWeaponData(playerid, 7, pInfo[playerid][Weapon7], pInfo[playerid][Ammo7]);
    GetPlayerWeaponData(playerid, 8, pInfo[playerid][Weapon8], pInfo[playerid][Ammo8]);
    GetPlayerWeaponData(playerid, 9, pInfo[playerid][Weapon9], pInfo[playerid][Ammo9]);
    GetPlayerWeaponData(playerid, 10, pInfo[playerid][Weapon10], pInfo[playerid][Ammo10]);
    GetPlayerWeaponData(playerid, 11, pInfo[playerid][Weapon11], pInfo[playerid][Ammo11]);
    GetPlayerWeaponData(playerid, 12, pInfo[playerid][Weapon12], pInfo[playerid][Ammo12]);
	new INI:file = INI_Open(Path(playerid));
    INI_SetTag(file,"Player's Data");
    INI_WriteString(file,"Password",pInfo[playerid][Pass]);
    INI_WriteInt(file,"Adminlevel",pInfo[playerid][Adminlevel]);
    INI_WriteInt(file,"VIPlevel",pInfo[playerid][VIPlevel]);
    INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
    INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
    INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
    INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
    INI_WriteInt(file, "Skin", pInfo[playerid][Skin]);
    INI_WriteInt(file,"Weapon0",pInfo[playerid][Weapon0]);
    INI_WriteInt(file,"Ammo0",pInfo[playerid][Ammo0]);
    INI_WriteInt(file,"Weapon1",pInfo[playerid][Weapon1]);
    INI_WriteInt(file,"Ammo1",pInfo[playerid][Ammo1]);
    INI_WriteInt(file,"Weapon2",pInfo[playerid][Weapon2]);
    INI_WriteInt(file,"Ammo2",pInfo[playerid][Ammo2]);
    INI_WriteInt(file,"Weapon3",pInfo[playerid][Weapon3]);
    INI_WriteInt(file,"Ammo3",pInfo[playerid][Ammo3]);
    INI_WriteInt(file,"Weapon4",pInfo[playerid][Weapon4]);
    INI_WriteInt(file,"Ammo4",pInfo[playerid][Ammo4]);
    INI_WriteInt(file,"Weapon5",pInfo[playerid][Weapon5]);
    INI_WriteInt(file,"Ammo5",pInfo[playerid][Ammo5]);
    INI_WriteInt(file,"Weapon6",pInfo[playerid][Weapon6]);
    INI_WriteInt(file,"Ammo6",pInfo[playerid][Ammo6]);
    INI_WriteInt(file,"Weapon7",pInfo[playerid][Weapon7]);
    INI_WriteInt(file,"Ammo7",pInfo[playerid][Ammo7]);
    INI_WriteInt(file,"Weapon8",pInfo[playerid][Weapon8]);
    INI_WriteInt(file,"Ammo8",pInfo[playerid][Ammo8]);
    INI_WriteInt(file,"Weapon9",pInfo[playerid][Weapon9]);
    INI_WriteInt(file,"Ammo9",pInfo[playerid][Ammo9]);
    INI_WriteInt(file,"Weapon10",pInfo[playerid][Weapon10]);
    INI_WriteInt(file,"Ammo10",pInfo[playerid][Ammo10]);
    INI_WriteInt(file,"Weapon11",pInfo[playerid][Weapon11]);
    INI_WriteInt(file,"Ammo11",pInfo[playerid][Ammo11]);
    INI_WriteInt(file,"Weapon12",pInfo[playerid][Weapon12]);
    INI_WriteInt(file,"Ammo12",pInfo[playerid][Ammo12]);
    INI_WriteInt(file,"Warnings",pInfo[playerid][Warnings]);
    INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);
    INI_WriteInt(file,"Muted",pInfo[playerid][Muted]);
    INI_WriteInt(file,"tMuted",pInfo[playerid][tMuted]);
    INI_WriteInt(file,"Jail",pInfo[playerid][Jail]);
    INI_WriteInt(file,"JailTime",pInfo[playerid][JailTime]);
    INI_WriteString(file,"IP",pInfo[playerid][IP]);
    INI_WriteInt(file,"BizID",pInfo[playerid][BizID]);
    INI_WriteInt(file,"AWarnings",pInfo[playerid][AWarnings]);
    INI_WriteInt(file,"reset1",pInfo[playerid][reset1]);
    INI_WriteString(file,"LastOnline",string);
    INI_Close(file);
	SaveAccount(playerid);
	SaveUserDrugStats(playerid);
	}
	if(Dueling[playerid] == true)
 	{
 	DuelActive = false;
 	Dueling[Duelist[playerid]] = false;
 	Dueling[playerid] = false;
  	WinningPrice = 0;
  	pInfo[Duelist[playerid]][Money] = GetPlayerMoney(Duelist[playerid]);
	SpawnPlayer(Duelist[playerid]);
  	}
  	if(InDerby[playerid] == 1)
    {
        PlayersInDerby -= 1;
        InDerby[playerid] = 0;
        DeletePVar(playerid, "DERBY");
        DestroyVehicle(GetPlayerVehicleID(playerid));
        SetPlayerVirtualWorld(playerid,0);
    if(PlayersInDerby == 1)
    {
        for(new i=0;i<MAX_PLAYERS;i++)
        {
            if(InDerby[i] == 1)
            {
                InDerby[i] = 0;
                format(string, sizeof(string), "%s е победител на DERBY! Поздравления! Получава $500 000 + 10 точки!", PlayerName(i));
                SendClientMessageToAll(0x00FFFFFF, string);
				SetPlayerScore(i,GetPlayerScore(i)+10);
				pInfo[i][Scores] = GetPlayerScore(i);
                GivePlayerCash(i, 500000);
                SetPlayerVirtualWorld(i,0);
                DeletePVar(i, "DERBY");
                pInfo[i][Money] = GetPlayerMoney(i);
                SpawnPlayer(i);
                enablederby=0;
            }
        }
        DerbyGame = NON_DERBY;
        DerbyStarted = false;
        PlayersInDerby = 0;
    }
    }
	inDM[playerid] = 0;
	indm1[playerid] = 0;
	indm2[playerid] = 0;
	indm3[playerid] = 0;
	indm4[playerid] = 0;
	indm5[playerid] = 0;
	indm6[playerid] = 0;
	indm7[playerid] = 0;
	FRod[playerid] = 0;
	Fishing[playerid] =0;
	Bait[playerid] = 0;
	FLine[playerid] = 0;
	SetPVarInt(playerid, "laser", 0);
    RemovePlayerAttachedObject(playerid, 0);
	Delete3DTextLabel(PlayerLabel);
	if(IsTowTrucker[playerid]==1)
 	{
    	IsTowTrucker[playerid]=0;
    	TowTruckers--;
    }
	if(CreatedRamp[playerid] == true) DestroyObject(Ramp[playerid]), CreatedRamp[playerid] = false;
	CreatedRamp[playerid] = false;
	Enabled[playerid]=0;
	Pers[playerid]=0;
	RemoveNeons(playerid);
	if(GangHide[playerid] == 0) return Delete3DTextLabel(label[playerid]);
	if(grider[playerid][0]){
        DestroyObject(grider[playerid][0]);
        DestroyObject(grider[playerid][1]);
        DestroyObject(grider[playerid][2]);
        grider[playerid][0] = 0;
        }
    if(Joined[playerid] == true)
    {
		JoinCount--;
		Joined[playerid] = false;
		DeletePVar(playerid, "DERBY");
		DestroyVehicle(CreatedRaceVeh[playerid]);
		DisablePlayerRaceCheckpoint(playerid);
		TextDrawHideForPlayer(playerid, RaceInfo[playerid]);
		CPProgess[playerid] = 0;
		KillTimer(InfoTimer[playerid]);
		SetPlayerVirtualWorld(playerid, 0);
	}
	TextDrawDestroy(RaceInfo[playerid]);
	return 1;
}
Reply
#6

Now, it happened again
Код:
Line 40048: [15:59:11] [debug] Server crashed while executing bgmod.amx
	Line 40049: [15:59:11] [debug] AMX backtrace:
	Line 40050: [15:59:11] [debug] #0 00000029 in ?? () at <unknown file>:0
	Line 40051: [15:59:11] [debug] #1 00000029 in public FC_OnPlayerDisconnect () at <unknown file>:0
	Line 40052: [15:59:11] [debug] #2 native CallLocalFunction () from samp03svr
	Line 40053: [15:59:11] [debug] #3 0002efe4 in public SSCANF_OnPlayerDisconnect (playerid=28, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\fuckcleo.inc:219
	Line 40054: [15:59:11] [debug] #4 00025e9c in ?? (... <2 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\sscanf2.inc:229
	Line 40055: [15:59:11] [debug] #5 0001821c in public OnPlayerDisconnect (playerid=28, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:661
	Line 40056: [15:59:11] [debug] #6 native Kick () from samp03svr
	Line 40057: [15:59:11] [debug] #7 00304d5c in public GPD_OnDialogResponse (playerid=28, dialogid=2012, response=0, listitem=-1, inputtext[]=@0184c654 "") at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:34476
	Line 40058: [15:59:11] [debug] #8 native CallLocalFunction () from samp03svr
	Line 40059: [15:59:11] [debug] #9 00030088 in ?? (... <5 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\GPDID.inc:54
	Line 40060: [15:59:11] [debug] #10 0001bb1c in public OnDialogResponse (playerid=28, dialogid=2012, response=0, listitem=-1, inputtext[]=@0184c650 "") at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:2257
The 34476 line is
Код:
{
before INI_ParseFile
Код:
if(dialogid == dlogin)
    {
    new string[100];
        if(!response) return Kick(playerid);
        if(response)
        {
            if(!strcmp(inputtext,pInfo[playerid][Pass]))
            {
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
                SetPlayerScore(playerid,pInfo[playerid][Scores]);
                SetPlayerCash(playerid,pInfo[playerid][Money]);
                LoadAccount(playerid);
                if(fexist(DrugFilePath(playerid)))
			    {
			        INI_ParseFile(DrugFilePath(playerid), "LoadDrugData_%s", .bExtra = true, .extra = playerid);
			    }
			    else
			    {
This is my OnPlayerDisconnect
Код:
public OnPlayerDisconnect(playerid, reason)
{
    AntiDeAMX();
	new var0[80];
	new year, month, day;
	getdate(year, month, day);
	new string[128];
	format(string, sizeof(string), "%i/%i/%i", month, day, year);
	switch(reason) {
		case 0:
			format(var0, 100, "{FFFFFF}%s[ID:%i] {E60000}излезе от сървъра. {FFFFFF}(Crash)", PlayerName(playerid), playerid);
		case 1:
			format(var0, 100, "{FFFFFF}%s[ID:%i] {E60000}излезе от сървъра. {FFFFFF}(Leave)", PlayerName(playerid), playerid);
		case 2:
			format(var0, 100, "{FFFFFF}%s[ID:%i] {E60000}беше кикнат от сървъра. {FFFFFF}(Kick)", PlayerName(playerid), playerid);
	}
	SendClientMessageToAll(0xFFFF00AA, var0);
	if(logged[playerid] == 1)
	{
	GetPlayerWeaponData(playerid, 0, pInfo[playerid][Weapon0], pInfo[playerid][Ammo0]);
    GetPlayerWeaponData(playerid, 1, pInfo[playerid][Weapon1], pInfo[playerid][Ammo1]);
    GetPlayerWeaponData(playerid, 2, pInfo[playerid][Weapon2], pInfo[playerid][Ammo2]);
    GetPlayerWeaponData(playerid, 3, pInfo[playerid][Weapon3], pInfo[playerid][Ammo3]);
    GetPlayerWeaponData(playerid, 4, pInfo[playerid][Weapon4], pInfo[playerid][Ammo4]);
    GetPlayerWeaponData(playerid, 5, pInfo[playerid][Weapon5], pInfo[playerid][Ammo5]);
    GetPlayerWeaponData(playerid, 6, pInfo[playerid][Weapon6], pInfo[playerid][Ammo6]);
    GetPlayerWeaponData(playerid, 7, pInfo[playerid][Weapon7], pInfo[playerid][Ammo7]);
    GetPlayerWeaponData(playerid, 8, pInfo[playerid][Weapon8], pInfo[playerid][Ammo8]);
    GetPlayerWeaponData(playerid, 9, pInfo[playerid][Weapon9], pInfo[playerid][Ammo9]);
    GetPlayerWeaponData(playerid, 10, pInfo[playerid][Weapon10], pInfo[playerid][Ammo10]);
    GetPlayerWeaponData(playerid, 11, pInfo[playerid][Weapon11], pInfo[playerid][Ammo11]);
    GetPlayerWeaponData(playerid, 12, pInfo[playerid][Weapon12], pInfo[playerid][Ammo12]);
	new INI:file = INI_Open(Path(playerid));
    INI_SetTag(file,"Player's Data");
    INI_WriteString(file,"Password",pInfo[playerid][Pass]);
    INI_WriteInt(file,"Adminlevel",pInfo[playerid][Adminlevel]);
    INI_WriteInt(file,"VIPlevel",pInfo[playerid][VIPlevel]);
    INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
    INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
    INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
    INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
    INI_WriteInt(file, "Skin", pInfo[playerid][Skin]);
    INI_WriteInt(file,"Weapon0",pInfo[playerid][Weapon0]);
    INI_WriteInt(file,"Ammo0",pInfo[playerid][Ammo0]);
    INI_WriteInt(file,"Weapon1",pInfo[playerid][Weapon1]);
    INI_WriteInt(file,"Ammo1",pInfo[playerid][Ammo1]);
    INI_WriteInt(file,"Weapon2",pInfo[playerid][Weapon2]);
    INI_WriteInt(file,"Ammo2",pInfo[playerid][Ammo2]);
    INI_WriteInt(file,"Weapon3",pInfo[playerid][Weapon3]);
    INI_WriteInt(file,"Ammo3",pInfo[playerid][Ammo3]);
    INI_WriteInt(file,"Weapon4",pInfo[playerid][Weapon4]);
    INI_WriteInt(file,"Ammo4",pInfo[playerid][Ammo4]);
    INI_WriteInt(file,"Weapon5",pInfo[playerid][Weapon5]);
    INI_WriteInt(file,"Ammo5",pInfo[playerid][Ammo5]);
    INI_WriteInt(file,"Weapon6",pInfo[playerid][Weapon6]);
    INI_WriteInt(file,"Ammo6",pInfo[playerid][Ammo6]);
    INI_WriteInt(file,"Weapon7",pInfo[playerid][Weapon7]);
    INI_WriteInt(file,"Ammo7",pInfo[playerid][Ammo7]);
    INI_WriteInt(file,"Weapon8",pInfo[playerid][Weapon8]);
    INI_WriteInt(file,"Ammo8",pInfo[playerid][Ammo8]);
    INI_WriteInt(file,"Weapon9",pInfo[playerid][Weapon9]);
    INI_WriteInt(file,"Ammo9",pInfo[playerid][Ammo9]);
    INI_WriteInt(file,"Weapon10",pInfo[playerid][Weapon10]);
    INI_WriteInt(file,"Ammo10",pInfo[playerid][Ammo10]);
    INI_WriteInt(file,"Weapon11",pInfo[playerid][Weapon11]);
    INI_WriteInt(file,"Ammo11",pInfo[playerid][Ammo11]);
    INI_WriteInt(file,"Weapon12",pInfo[playerid][Weapon12]);
    INI_WriteInt(file,"Ammo12",pInfo[playerid][Ammo12]);
    INI_WriteInt(file,"Warnings",pInfo[playerid][Warnings]);
    INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);
    INI_WriteInt(file,"Muted",pInfo[playerid][Muted]);
    INI_WriteInt(file,"tMuted",pInfo[playerid][tMuted]);
    INI_WriteInt(file,"Jail",pInfo[playerid][Jail]);
    INI_WriteInt(file,"JailTime",pInfo[playerid][JailTime]);
    INI_WriteString(file,"IP",pInfo[playerid][IP]);
    INI_WriteInt(file,"BizID",pInfo[playerid][BizID]);
    INI_WriteInt(file,"AWarnings",pInfo[playerid][AWarnings]);
    INI_WriteInt(file,"reset1",pInfo[playerid][reset1]);
    INI_WriteString(file,"LastOnline",string);
    INI_Close(file);
	SaveAccount(playerid);
	SaveUserDrugStats(playerid);
	}
	/*if(pInfo[playerid][BizID] != 0)
	{
	new id;
	pInfo[playerid][BizID] = id;
	SaveBusiness(id);
	return 1;
	}
	}*/
	if(Dueling[playerid] == true && Duelist[playerid] != INVALID_PLAYER_ID)
 	{
 	DuelActive = false;
 	Dueling[Duelist[playerid]] = false;
 	Dueling[playerid] = false;
  	WinningPrice = 0;
  	pInfo[Duelist[playerid]][Money] = GetPlayerMoney(Duelist[playerid]);
	SpawnPlayer(Duelist[playerid]);
  	}
  	if(InDerby[playerid] == 1)
    {
        PlayersInDerby -= 1;
        InDerby[playerid] = 0;
        DeletePVar(playerid, "DERBY");
        DestroyVehicle(GetPlayerVehicleID(playerid));
        SetPlayerVirtualWorld(playerid,0);
    if(PlayersInDerby == 1)
    {
        for(new i=0;i<MAX_PLAYERS;i++)
        {
            if(InDerby[i] == 1)
            {
                InDerby[i] = 0;
                format(string, sizeof(string), "%s е победител на DERBY! Поздравления! Получава $500 000 + 10 точки!", PlayerName(i));
                SendClientMessageToAll(0x00FFFFFF, string);
				SetPlayerScore(i,GetPlayerScore(i)+10);
				pInfo[i][Scores] = GetPlayerScore(i);
                GivePlayerCash(i, 500000);
                SetPlayerVirtualWorld(i,0);
                DeletePVar(i, "DERBY");
                pInfo[i][Money] = GetPlayerMoney(i);
                SpawnPlayer(i);
                enablederby=0;
            }
        }
        DerbyGame = NON_DERBY;
        DerbyStarted = false;
        PlayersInDerby = 0;
    }
    }
	inDM[playerid] = 0;
	indm1[playerid] = 0;
	indm2[playerid] = 0;
	indm3[playerid] = 0;
	indm4[playerid] = 0;
	indm5[playerid] = 0;
	indm6[playerid] = 0;
	indm7[playerid] = 0;
	FRod[playerid] = 0;
	Fishing[playerid] =0;
	Bait[playerid] = 0;
	FLine[playerid] = 0;
	SetPVarInt(playerid, "laser", 0);
    RemovePlayerAttachedObject(playerid, 0);
	Delete3DTextLabel(PlayerLabel);
	if(IsTowTrucker[playerid]==1)
 	{
    	IsTowTrucker[playerid]=0;
    	TowTruckers--;
    }
	if(CreatedRamp[playerid] == true) DestroyObject(Ramp[playerid]), CreatedRamp[playerid] = false;
	CreatedRamp[playerid] = false;
	Enabled[playerid]=0;
	Pers[playerid]=0;
	RemoveNeons(playerid);
	if(GangHide[playerid] == 0) return Delete3DTextLabel(label[playerid]);
	if(grider[playerid][0]){
        DestroyObject(grider[playerid][0]);
        DestroyObject(grider[playerid][1]);
        DestroyObject(grider[playerid][2]);
        grider[playerid][0] = 0;
        }
    if(Joined[playerid] == true)
    {
		JoinCount--;
		Joined[playerid] = false;
		DeletePVar(playerid, "DERBY");
		DestroyVehicle(CreatedRaceVeh[playerid]);
		DisablePlayerRaceCheckpoint(playerid);
		TextDrawHideForPlayer(playerid, RaceInfo[playerid]);
		CPProgess[playerid] = 0;
		KillTimer(InfoTimer[playerid]);
		SetPlayerVirtualWorld(playerid, 0);
	}
	TextDrawDestroy(RaceInfo[playerid]);
	return 1;
}
Reply
#7

Send from line 40048 to line 40060
Reply
#8

Код:
Line 40048: [15:59:11] [debug] Server crashed while executing bgmod.amx
	Line 40049: [15:59:11] [debug] AMX backtrace:
	Line 40050: [15:59:11] [debug] #0 00000029 in ?? () at <unknown file>:0
	Line 40051: [15:59:11] [debug] #1 00000029 in public FC_OnPlayerDisconnect () at <unknown file>:0
	Line 40052: [15:59:11] [debug] #2 native CallLocalFunction () from samp03svr
	Line 40053: [15:59:11] [debug] #3 0002efe4 in public SSCANF_OnPlayerDisconnect (playerid=28, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\fuckcleo.inc:219
	Line 40054: [15:59:11] [debug] #4 00025e9c in ?? (... <2 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\sscanf2.inc:229
	Line 40055: [15:59:11] [debug] #5 0001821c in public OnPlayerDisconnect (playerid=28, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:661
	Line 40056: [15:59:11] [debug] #6 native Kick () from samp03svr
	Line 40057: [15:59:11] [debug] #7 00304d5c in public GPD_OnDialogResponse (playerid=28, dialogid=2012, response=0, listitem=-1, inputtext[]=@0184c654 "") at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:34476
	Line 40058: [15:59:11] [debug] #8 native CallLocalFunction () from samp03svr
	Line 40059: [15:59:11] [debug] #9 00030088 in ?? (... <5 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\GPDID.inc:54
	Line 40060: [15:59:11] [debug] #10 0001bb1c in public OnDialogResponse (playerid=28, dialogid=2012, response=0, listitem=-1, inputtext[]=@0184c650 "") at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:2257
Here it is from the server log. In the GM I don't have these lines, the GM is shorter.
Reply
#9

Do you get any warning when compiling your script? Do you use a #pragma dynamic? You might need to increase it.
Reply
#10

I have no warnings when I compile. What did you mean with the #pragma dynamic?
Today it stopped again:
Код:
Line 92741: [21:13:55] [debug] Server crashed while executing bgmod.amx
	Line 92742: [21:13:55] [debug] AMX backtrace:
	Line 92743: [21:13:55] [debug] #0 00000029 in ?? () at <unknown file>:0
	Line 92744: [21:13:55] [debug] #1 00000029 in public FC_OnPlayerDisconnect () at <unknown file>:0
	Line 92745: [21:13:55] [debug] #2 native CallLocalFunction () from samp03svr
	Line 92746: [21:13:55] [debug] #3 0002efe4 in public SSCANF_OnPlayerDisconnect (playerid=44, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\fuckcleo.inc:219
	Line 92747: [21:13:55] [debug] #4 00025e9c in ?? (... <2 arguments>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\sscanf2.inc:229
	Line 92748: [21:13:55] [debug] #5 0001821c in public OnPlayerDisconnect (playerid=44, reason=2) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:661
	Line 92749: [21:13:55] [debug] #6 native Kick () from samp03svr
	Line 92750: [21:13:55] [debug] #7 00309c10 in public FC_OnPlayerUpdate (playerid=44) at C:\Users\Martin Ivanov\Desktop\server working\server working\gamemodes\bgmod.pwn:34831
	Line 92751: [21:13:55] [debug] #8 native CallLocalFunction () from samp03svr
	Line 92752: [21:13:55] [debug] #9 0002ebc0 in ?? (... <1 argument>) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\fuckcleo.inc:196
	Line 92753: [21:13:55] [debug] #10 0001b320 in public OnPlayerUpdate (playerid=44) at C:\Users\Martin Ivanov\Desktop\server working\server working\pawno\include\YSI\y_hooks/impl.inc:2038
Код:
new string[100];
        if(GetPlayerPing(playerid) >= 350 && playerid != INVALID_PLAYER_ID)
        {
                format(string, sizeof(string), "SERVER: %s беше кикнат от сървъра. [Причина: Висок пинг!]", PlayerName(playerid));
                SendClientMessageToAll(COLOR_RED, string);
				Kick(playerid);
        }
The Kick(playerid) line is the line from the log
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)