SA-MP Forums Archive
Timers stop working after working for the most part of the day. - 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 stop working after working for the most part of the day. (/showthread.php?tid=578253)



Timers stop working after working for the most part of the day. - [WSF]ThA_Devil - 17.06.2015

Hello,
I've ran into an issue, that after a while, timers tend to break. I'm not sure whether it is an issue of a plugin (YSF) or I'm doing something wrong.
I created a timer using this function:

SetTimer("OnGodUpdateTimer",1000,true);

And I never kill it, well. As it must run all the time, yet it fails to do so.

Also, other timers, but not all, break at the same time.

Edit:
In attempts to fix it, I added a hook to KillTimer, which sets the timer variable to -1, when a timer is killed, to prevent accidental timer killings. We'll see what happens.