CrashDetect - FarmStart
#1

My server was restarting and i received this in server_logs.txt:

Код HTML:
18:44:04] [debug] Server crashed while executing gm.amx
[18:44:04] [debug] AMX backtrace:
[18:44:04] [debug] #0 00000004 in public FarmStart (playerid=16) at <unknown file>:0
[18:44:04] [debug] Native backtrace:
[18:44:04] [debug] #0 f7418e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[18:44:04] [debug] #1 f7411bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[18:44:04] [debug] #2 f7412dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[18:44:04] [debug] #3 f7413226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[18:44:04] [debug] #4 f7418adc in ?? () from plugins/crashdetect.so
[18:44:04] [debug] #5 f7706410 in ?? ()
FarmStart Callback:

Код HTML:
forward FarmStart(playerid);
public FarmStart(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 200.0, jobVariables[6][jJobPosition][0], jobVariables[6][jJobPosition][1], jobVariables[6][jJobPosition][2]))
		{
		new car = GetPlayerVehicleID(playerid);

		if(PlayerData[playerid][pJob] == 1)
		{
		new Speed = GetVehicleSpeed(car);
		if(Speed > 24) //&& GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{

				if(PlayerData[playerid][pCarID5] == car)
				{
						if(!IsPlayerPaused(playerid))
						{
								if(FarmMoney[playerid] >= 1)
								{
										FarmMoney[playerid] --;
										format(string128, sizeof(string128), "~w~Walk: ~y~ %d ~w~seconds...", FarmMoney[playerid]);
										TextDrawShowForPlayer(playerid, CPDT[playerid]);
										TextDrawSetString(CPDT[playerid], string128);
										if(FarmMoney[playerid] == 2)
										{
												FarmMoney[playerid] = 60;
												new cash = random(10000) + 30000;
												FarmMoneyF[playerid] = cash;
		        								KillTimer(farmtimer[playerid]);
		        								CP[playerid] = 394;
		        								TextDrawHideForPlayer(playerid,CPDT[playerid]);
		        								SetPlayerCheckpoint(playerid,businessVariables[28][bExteriorPos][0],businessVariables[28][bExteriorPos][1],businessVariables[28][bExteriorPos][2],4.0);
//												new Float: fDistance = GetPlayerDistanceFromPoint(playerid, businessVariables[28][bExteriorPos][0],businessVariables[28][bExteriorPos][1],businessVariables[28][bExteriorPos][2]);
    				 							distantax[playerid] = businessVariables[6][bExteriorPos][0];
                								distantay[playerid] = businessVariables[6][bExteriorPos][1];
                								GPSCurs[playerid] = 1;
												UpdateTimer[playerid] = SetTimerEx("distance_timerr", 750, true, "i", playerid);
										}
								}
							}
						}
				}
			}
		}
	return 1;
}
Help please?
Reply
#2

Hello, your TIMER is small, increase the TIMER.
Too small timer causes a restart
Reply
#3

I am using "UpdateTimer[playerid] = SetTimerEx("distance_timerr", 750, true, "i", playerid);
}" in more commands and it works. Why?
Reply
#4

You are using KillTimer(UpdateTimer[playerid]); somewhere?
Reply
#5

Sure. At OnPlayerDisconnect and in some commands like :killcp.
Reply
#6

Hi, edit that
Код:
UpdateTimer[playerid] = SetTimerEx("distance_timerr", 750, true, "i", playerid);
to
Код:
UpdateTimer[playerid] = SetTimerEx("distance_timerr", 1000, false, "i", playerid);
and test if he restart again
Reply
#7

Are you sure about that ? Is it the problem for restarting even if i am using it on any commands and then the server doesn't restarting?
Reply
#8

for me the problem is too small timer, I already experience the problem. Then think about a check the WIKI
https://sampwiki.blast.hk/wiki/SetTimerEx
Reply
#9

Ok. I will try. Thanks
Reply
#10

no problem
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)