Difference between y_timer and 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: Difference between y_timer and SetTimer ? (
/showthread.php?tid=494831)
Difference between y_timer and SetTimer ? -
anou1 - 14.02.2014
Hi,
I read this tutorial :
https://sampforum.blast.hk/showthread.php?tid=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
Re: Difference between y_timer and SetTimer ? -
ColeMiner - 15.02.2014
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.
Re: Difference between y_timer and SetTimer ? -
anou1 - 15.02.2014
Sorry for the bumps.
So y_timers isnt "faster" or something like that against SetTimer ?
Thank you !
Re: Difference between y_timer and SetTimer ? -
ColeMiner - 15.02.2014
No, just simpler and more secure.
Re: Difference between y_timer and SetTimer ? -
anou1 - 15.02.2014
Okay thank you ColeMiner !
+Rep
Re: Difference between y_timer and SetTimer ? -
Scenario - 16.02.2014
I find y_timers MUCH easier to use. SetTimer(Ex) gets annoying.