[Include] Timer Fix (seamlessly makes SetTimer very accurate)
#21

So, here we have another cool release by Slice.

I'll experiment stuff with it, Thanks.
Reply
#22

Very useful. Keep it up.
Reply
#23

Thank you, great release.
Reply
#24

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

You tell em' your teh boss

The code looks well written
Reply
#26

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--; )
Reply
#27

Great Idea/Script. Thanks.
Reply
#28

Very Nice.
Reply
#29

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.
Reply
#30

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

Looks great cant wait to try it out
Reply
#32

very useful, thanks
Reply
#33

really nice
Reply
#34

Sounds really nice will test this :3
Reply
#35

Excellent release
Reply
#36

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

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.
Reply
#38

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.
Reply
#39

Wow that freaking amazing, very useful, thanks
Reply
#40

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)