SA-MP Forums Archive
[HELP] Problem with SetTimer - 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: [HELP] Problem with SetTimer (/showthread.php?tid=347948)



[HELP] Problem with SetTimer - [NWD]Jim._.Carrey - 03.06.2012

Hi folks, I have a very serious problem on my server.
The case is that something is making the settimer stop working, i.e. some timer are stopping working alone and has no killtimer to kill them.
What can cause this?


Re: [HELP] Problem with SetTimer - leonardo1434 - 03.06.2012

Probably there's a conflict between them...


Respuesta: [HELP] Problem with SetTimer - [NWD]Jim._.Carrey - 03.06.2012

Which conflict would it be?
Do I need to correct this, just do not know how =\


Respuesta: [HELP] Problem with SetTimer - [NWD]Jim._.Carrey - 04.06.2012

Someone?


Re: [HELP] Problem with SetTimer - MP2 - 04.06.2012

If you do

pawn Код:
new timer1;
new timer2;

timer1 = SetTimer(...);

KillTimer(timer1);

timer2 = SetTimer(...);
Killing timer 1 will kill timer 2, as they have the same ID.


Respuesta: [HELP] Problem with SetTimer - [NWD]Jim._.Carrey - 04.06.2012

Already set them so, more is still killing one of them, is not a fixed timer always dies a different one is never the same.
No updates made in recent days involves settimer.
I use the include Streamer Plugin v 2.6.1, could be a conflict with the same?


Re: [HELP] Problem with SetTimer - MP2 - 04.06.2012

When you kill a timer, do this

pawn Код:
new timer1;

timer1 = SetTimer(...);

KillTimer(timer1);
timer1 = -1;
It'd be a good idea to write a hook/macro for this, which I may do.


Respuesta: [HELP] Problem with SetTimer - [NWD]Jim._.Carrey - 04.06.2012

I understand your logic but is still going to be difficult for me, because these timer's are started from OnGameModeInit and are only destroyed in OnGameModeExit, i.e. because they are being destroyed by themselves?


Re: [HELP] Problem with SetTimer - MP2 - 04.06.2012

There is no need to kill timers in OnGameModeExit.


Respuesta: [HELP] Problem with SetTimer - [NWD]Jim._.Carrey - 04.06.2012

Even I couldn't understand why my timer's are dying, more I will try to solve this, thanks a lot for your help I am very thankful.