SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 23/03/2018, 02:32 PM   #21
m4karow
Huge Clucker
 
Join Date: Oct 2015
Posts: 221
Reputation: 13
Default Re: Timer Fix - Do not miss a one second

I use some a few fast timer for animation callbacks, and maybe it will useful for me. i'll try it, thanks!

hmm, okay
Code:
[2018/03/23 14:36:01] [Timer Fix] Cannot call function [EL: 1]
[2018/03/23 14:36:01] [Timer Fix] Cannot call function [EL: 1]
and is there any way to find out which timer have to be killed? a log like in mysql plugin or something like that?
Code:
[2018/03/23 14:36:01] [Timer Fix] KillTimer: cannot find timer with id 0
this could be very useful for bug-fixing
m4karow is offline   Reply With Quote
Old 23/03/2018, 03:12 PM   #22
ForCop
Banned
 
Join Date: Mar 2018
Location: Moldova of Republic
Posts: 116
Reputation: 5
Default Re: Timer Fix - Do not miss a one second

Quote:
Originally Posted by m4karow View Post
I use some a few fast timer for animation callbacks, and maybe it will useful for me. i'll try it, thanks!

hmm, okay
Code:
[2018/03/23 14:36:01] [Timer Fix] Cannot call function [EL: 1]
[2018/03/23 14:36:01] [Timer Fix] Cannot call function [EL: 1]
and is there any way to find out which timer have to be killed? a log like in mysql plugin or something like that?
Code:
[2018/03/23 14:36:01] [Timer Fix] KillTimer: cannot find timer with id 0
this could be very useful for bug-fixing

[2018/03/23 14:36:01] [Timer Fix] KillTimer: cannot find timer with id 0


Code:
if(IsValidTimer(timerid))  KillTimer(timerid);
[2018/03/23 14:36:01] [Timer Fix] Cannot call function [EL: 1]

create, please function...
exemple:
Code:
new timerid;
public OnGameModeInit() 
{
 timerid = SetTimer("UpDate",1000, true);
 return true;
}


forward UpDate();
public UpDate() 
{
  if(IsValidTimer(timerid))  KillTimer(timerid);
  return true;
}
ForCop is offline   Reply With Quote
Old 23/03/2018, 04:09 PM   #23
KashCherry
Big Clucker
 
KashCherry's Avatar
 
Join Date: Feb 2018
Location: Estonia
Posts: 50
Reputation: 24
Default Re: Timer Fix - Do not miss a one second

Quote:
Originally Posted by m4karow View Post
I use some a few fast timer for animation callbacks, and maybe it will useful for me. i'll try it, thanks!

hmm, okay
Code:
[2018/03/23 14:36:01] [Timer Fix] Cannot call function [EL: 1]
[2018/03/23 14:36:01] [Timer Fix] Cannot call function [EL: 1]
and is there any way to find out which timer have to be killed? a log like in mysql plugin or something like that?
Code:
[2018/03/23 14:36:01] [Timer Fix] KillTimer: cannot find timer with id 0
this could be very useful for bug-fixing
What plugins/includes are you using?
KashCherry is offline   Reply With Quote
Old 23/03/2018, 06:06 PM   #24
m4karow
Huge Clucker
 
Join Date: Oct 2015
Posts: 221
Reputation: 13
Default Re: Timer Fix

incs: y iters, discord connector, profiler, crashdetect sscanf mysql, 3dtryg, mapandreas, progressbar, smartcmd, audio etc
plugins crashdetect mysql sscanf streamer audio MapAndreas profiler discord-connector
m4karow is offline   Reply With Quote
Old 01/04/2018, 02:18 PM   #25
JustNothing
Big Clucker
 
Join Date: Nov 2015
Location: Lithuania
Posts: 62
Reputation: 6
Default Re: Timer Fix

when I reload gamemode with gmx in the console starts flooding
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:51] [Timer Fix] Timer executing failed
[16:16:52] [Timer Fix] Timer executing failed
[16:16:52] [Timer Fix] Timer executing failed
[16:16:52] [Timer Fix] Timer executing failed
[16:16:52] [Timer Fix] Timer executing failed
JustNothing is online now   Reply With Quote
Old 02/04/2018, 11:29 AM   #26
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 15,310
Reputation: 3191
Default Re: Timer Fix - Do not miss a one second

Quote:
Originally Posted by Unrea1 View Post
This happens becasue to problems of incompatibility on fixes.inc and this plugin. Just remove fixes.inc and test.
That's awful advice! The incompatibility with existing widely used and maintained code should really be found and fixed, instead of disabling hundreds of other fixes for the sake of this one.
Y_Less is offline   Reply With Quote
Old 02/04/2018, 06:30 PM   #27
AroseKhanNiazi
High-roller
 
AroseKhanNiazi's Avatar
 
Join Date: Jan 2014
Location: Pakistan
Posts: 1,372
Reputation: 78
Default Re: Timer Fix

^^ Reason I'm not using it while I will love too when it's fixed.
AroseKhanNiazi is offline   Reply With Quote
Old 24/04/2018, 09:33 PM   #28
must006
Little Clucker
 
Join Date: Mar 2012
Posts: 7
Reputation: 0
Default Re: Timer Fix

There are things I need in this plugin.


GetTimerInterval
SetTimerInterval
SetTimerDelay

These are available in udan's plugin. Can it be added here?
must006 is offline   Reply With Quote
Old 26/04/2018, 02:06 PM   #29
KashCherry
Big Clucker
 
KashCherry's Avatar
 
Join Date: Feb 2018
Location: Estonia
Posts: 50
Reputation: 24
Default Re: Timer Fix

Plugin updated to version 1.0
- Added natives GetTimerInterval(timerid) & SetTimerInterval(timerid, interval)
- Problem with call callback has been solved (please check)
KashCherry is offline   Reply With Quote
Old 01/05/2018, 04:10 AM   #30
must006
Little Clucker
 
Join Date: Mar 2012
Posts: 7
Reputation: 0
Default Re: Timer Fix

Thanks @KashCherry

I have a problem with KillTimer function. Can you check please?
must006 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timer ID stored in a variable gets wiped when timer hits ? NeXoR Scripting Help 2 25/03/2017 08:22 PM
Performance Question , Per Player Timer vs Timer that loops through all players BiosMarcel Scripting Help 14 12/12/2016 10:50 AM
If /foodsearch doesn't find item, set wait timer (TIMER HELP) Josh_Main Scripting Help 7 14/09/2016 05:13 PM
Which is better Per Player Timer or Global timer? (issue with timer) Dokins Scripting Help 4 07/06/2016 10:50 AM
Slice's Timer Fix include --> timer public function isn't getting called Riwerry Scripting Help 0 02/01/2016 04:50 PM


All times are GMT. The time now is 08:29 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.