PDA

View Full Version : Difference between y_timer and SetTimer ?


anou1
14/02/2014, 10:08 PM
Hi,


I read this tutorial : http://forum.sa-mp.com/showthread.php?t=182948

And I wanted to know what's the difference between y_timer and SetTimer. And what's better to use.
Does it have inconvenients ?


Thank you :)

ColeMiner
15/02/2014, 08:43 PM
1) Stop bumping - the rules state that you can't double post inside24 hours.

2) The main difference is syntax and compiler integration. The compiler can check that you call a y_timers timer correctly, but not SetTimer. If you get the parameters wrong or spell the function name wrong you will get errors. Also, y_timers correctly supports strings and arrays, SetTimerEx doesn't.

anou1
15/02/2014, 09:15 PM
Sorry for the bumps.
So y_timers isnt "faster" or something like that against SetTimer ?

Thank you !

ColeMiner
15/02/2014, 09:18 PM
No, just simpler and more secure.

anou1
15/02/2014, 09:51 PM
Okay thank you ColeMiner !
+Rep

Scenario
16/02/2014, 05:52 AM
I find y_timers MUCH easier to use. SetTimer(Ex) gets annoying.