Timer stops randomly - 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: Timer stops randomly (
/showthread.php?tid=333837)
Timer stops randomly -
Dairyll - 13.04.2012
So yeah, some timers stop randomly then starts randomly. Apparently only a few people on SA-MP experience this so it's very hard to search for a solution. Can anyone help?
Re: Timer stops randomly -
RollTi - 13.04.2012
Are you using SetTimer or SetTimerEx?, use SetTimerEx if you gonna use playerid use SetTimerEx because the timer needs parameter
EDIT:
also if you want to keep the timer repeating just use something like this
pawn Код:
SetTimerEx(funcname, interval, true, format, float);
or if you use SetTimer it must be something like this
pawn Код:
SetTimer(funcname, interval, true);
false if you want to stop the timer after the timer calls the callback
Re: Timer stops randomly -
Ash. - 13.04.2012
Quote:
Originally Posted by RollTi
Are you using SetTimer or SetTimerEx?, use SetTimerEx if you gonna use playerid use SetTimerEx because the timer needs parameter
|
May I ask what that has to do with timers stopping?
I don't experience as described in the original post, however I do know that this may be caused by attempting to kill timers that don't "exist".
Re: Timer stops randomly -
Dairyll - 13.04.2012
I'm thinking it's because of the amount of timers I got. I'm reducing them right now and see if that'll work.
Edit: Nope. It didn't. I've reduced the total of my SetTimer and SetTimerEx to 6.
Re: Timer stops randomly -
Dairyll - 13.04.2012
Edit: Delete this. I thought someone replied after mine.
Re: Timer stops randomly -
Dairyll - 13.04.2012
Bump.