Timers seem to stop working, randomly and out of time at times. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timers seem to stop working, randomly and out of time at times. (
/showthread.php?tid=609015)
Timers seem to stop working, randomly and out of time at times. -
Dokins - 07.06.2016
I'm creating the timers, I've checked to ensure that the brackets are placed properly.
It's mostly the one minute timer that stops working 100%.
It's a global SetTimer (created on OnGameModeInit)
I use foreach and I also Kill the timers OnGameModeExit.
Are there any other factors to continue, I don't do any saving per minute on the timer to MYSQL or anything like that.
It includes the timer for /ajail etc.
Re: Timers seem to stop working, randomly and out of time at times. -
OmegaKiller72 - 07.06.2016
show your timer code
Re: Timers seem to stop working, randomly and out of time at times. -
TwinkiDaBoss - 07.06.2016
Show us your code, and also if you want accurate timers use things such as
https://sampforum.blast.hk/showthread.php?tid=289675
Re: Timers seem to stop working, randomly and out of time at times. -
PrO.GameR - 07.06.2016
Well I would say one of your killtimers thru code is malfunctioning, as any of them can kill another one (like when you KillTimer(Jail[playerid]) but jail has a wrong integer stored in it, so it ends up killing your CheckHealth timer)
Print the 1 minute global timer one's ID, I'm pretty sure it's 1 and somehow you end up killing it
A way to check it would be hooking killtimer to debug it, like printing the timer it's killing.