SA-MP Forums Archive
[Include] Timer Fix (seamlessly makes SetTimer very accurate) - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Timer Fix (seamlessly makes SetTimer very accurate) (/showthread.php?tid=289675)

Pages: 1 2 3 4


Re: Timer Fix (seamlessly makes SetTimer very accurate) - iPLEOMAX - 12.10.2011

So, here we have another cool release by Slice.

I'll experiment stuff with it, Thanks.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - TheArcher - 12.10.2011

Very useful. Keep it up.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Deskoft - 13.10.2011

Thank you, great release.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - CyNiC - 13.10.2011

Good job, as always bringing us new things and ways to scripting.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Lorenc_ - 13.10.2011

You tell em' your teh boss

The code looks well written


Re: Timer Fix (seamlessly makes SetTimer very accurate) - RyDeR` - 13.10.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
I don't think that actually does what you think it does (and I know you don't think it solves Slice's issue)... Your method of calculating "iEnd" is wrong - check the original "SendClientMessageEx" code by ZeeX on which this is based (although I'm not sure if the method you're trying to emulate was in his code or my modification - check them both).

That code will help eventually, although frankly Slice I think "y_inline" will help FAR more (as in basically solve your problems MOSTLY - there are some small issues with strings, but they don't currently work with timers outside y_timers anyway). In fact this idea makes me think I should port y_timers to use y_inline entirely - they do half the same things and it will make the code MUCH neater.

For reference I'm thinking call "Callback_Get" in your "SetTimerEx" function (it works on publics too) and then call "Callback_Call" (using some of RyDeR`'s code to pass variable parameters) in your public timer function, having saved just the "E_CALLBACK_DATA" structure in your global array. Then dispose of the structure ("Callback_Destroy" or something, I forget) in "KillTimer" or if the timer is non-repeating - interestingly this will mean that you will, with no extra effort, support inline timers.
May I ask why you think this code doesn't do what I think it does? It's based off ZeeX' CPF function. It is actually working fine without problems so far, can't really see anything wrong except the part where I clear the stack. It should be like this:
pawn Код:
for(iArgs = (iArgs >> 2) + 1; iArgs--; )



AW: Timer Fix (seamlessly makes SetTimer very accurate) - Pablo Borsellino - 13.10.2011

Great Idea/Script. Thanks.


Re : Timer Fix (seamlessly makes SetTimer very accurate) - TheBest6 - 13.10.2011

Very Nice.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Lorenc_ - 06.11.2011

This actually knocks my timers out for some reason, I don't understand why though I use a lot of SetTimerEx (about 3-5)

Not sure why. Just giving a little shoutout.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Slice - 06.11.2011

Do the timers just not fire? Do you see any output in the console? Are there strings being used in SetTimerEx?


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Lookin - 06.11.2011

Looks great cant wait to try it out


Re: Timer Fix (seamlessly makes SetTimer very accurate) - LZLo - 06.11.2011

very useful, thanks


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Sascha - 06.11.2011

really nice


Respuesta: Timer Fix (seamlessly makes SetTimer very accurate) - Donuts - 07.11.2011

Sounds really nice will test this :3


Re: Timer Fix (seamlessly makes SetTimer very accurate) - ViniBorn - 07.11.2011

Excellent release


AW: Re: Timer Fix (seamlessly makes SetTimer very accurate) - Littl3j0hNy - 13.11.2011

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
This actually knocks my timers out for some reason
Same here.
Is there any fix for that?


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Lorenc_ - 14.11.2011

Quote:
Originally Posted by Slice
Посмотреть сообщение
Do the timers just not fire? Do you see any output in the console? Are there strings being used in SetTimerEx?
The timers fire for a short period of time though suddenly stop. Yeah I see on the console as the output: (5, 4, "STOP")

I'm using strings of-course in the timers, I'm sure that y_less managed a fix for this in the y_timers include, I think.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - Slice - 14.11.2011

If you're using YSI, do this:

pawn Код:
#define TIMER_FIX_DISABLE_EX true
#include <timerfix>
Does that fix it?

One issue I know can cause problems is if a function called by a timer would fail somehow (array out of bounds, for example). If one timer function fails, all others will fail after it.


Re: Timer Fix (seamlessly makes SetTimer very accurate) - juraska - 13.12.2011

Wow that freaking amazing, very useful, thanks


Re: Timer Fix (seamlessly makes SetTimer very accurate) - BaubaS - 13.12.2011

Quote:
Originally Posted by juraska
Посмотреть сообщение
Wow that freaking amazing, very useful, thanks
Can you shut the fuck up one time? ~90% of your posts are: DAS IS OSUM, I'VE GONNA USE IT OFC