[Plugin] Timer Fix
#61

Quote:
Originally Posted by KashCherry
Посмотреть сообщение
Can you give me this fs?
For sure:
https://pastebin.com/SQDWfc6S (this fs I used in my video)
And another fs(that I didn't used in the video)
https://pastebin.com/9pSXpkQ0
Reply
#62

Plugin updated to version 1.06

- Fixed (big) delays.
- Added warning message about a large number of timers.

Download from Releases page.
Reply
#63

Quote:
Originally Posted by KashCherry
Посмотреть сообщение
Plugin updated to version 1.06

- Fixed (big) delays.
- Added warning message about a large number of timers.

Download from Releases page.
Hello, since I updated this plugin with the latest version I get this errors in server_log, so my server won't open:
[21:24:55] Loading plugin: timerfix.so
[21:24:55] Failed (plugins/timerfix.so: undefined symbol: pAMXFunctions)
Reply
#64

Quote:
Originally Posted by StRaphael
Посмотреть сообщение
Hello, since I updated this plugin with the latest version I get this errors in server_log, so my server won't open:
[21:24:55] Loading plugin: timerfix.so
[21:24:55] Failed (plugins/timerfix.so: undefined symbol: pAMXFunctions)
oh, yes, I'm sorry.
Reload please.
Reply
#65

Still the timers not working well with filterscripts. I mean the timers remains behind. I have tried to count with a crono, and when I add fs, the timers aren't really very accurate(-1 second by 20 seconds...or something...I think I checked 2 or 3 times).
I'm not really sure if I was really very accurate, but still I think this plugin it's not working very good with filterscripts.
Reply
#66

Quote:
Originally Posted by StRaphael
Посмотреть сообщение
Still the timers not working well with filterscripts. I mean the timers remains behind. I have tried to count with a crono, and when I add fs, the timers aren't really very accurate(-1 second by 20 seconds...or something...I think I checked 2 or 3 times).
I'm not really sure if I was really very accurate, but still I think this plugin it's not working very good with filterscripts.
You could use this test.

And during testing, the really big delays were not visible (except ProcessTick delay).
Make sure the problem is valid.
Reply
#67

Quote:
Originally Posted by KashCherry
Посмотреть сообщение
You could use this test.

And during testing, the really big delays were not visible (except ProcessTick delay).
Make sure the problem is valid.
I made 2 videos that proves my problem, one with filtrescripts and one without any fs.
Links:
yt.com/watch?v=It7Kx-hsKME (with fs(and yes, the fs is using timers))
yt.com/watch?v=Xo-kl0PkPZY (without any fs)
Reply
#68

Quote:
Originally Posted by StRaphael
Посмотреть сообщение
I made 2 videos that proves my problem, one with filtrescripts and one without any fs.
Links:
yt.com/watch?v=It7Kx-hsKME (with fs(and yes, the fs is using timers))
yt.com/watch?v=Xo-kl0PkPZY (without any fs)
Ok, thank you for the information. I'll try to figure out what the problem is.
Reply
#69

Quote:
Originally Posted by KashCherry
Посмотреть сообщение
Updated.

Added a GetTimerRemainingTime native.
Update timerfix.inc, please
Reply
#70

Moreover, this plugin stops working and a global timer stops ticking. However, if we run other plugins after one is dead, they work
Reply
#71

Plugin updated to version 1.1.1

Fixed:
- Fixed the problem when timers just stopped.
- Fixed the problem when the callback was called after the timer was deleted.

Added:
- Now you can pause the timer and continue it in the future.
Example:
PHP Code:
#include <timerfix>
new timer[MAX_PLAYERS];
forward WhileNotInVehicle(playerid);
public 
WhileNotInVehicle(playerid)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
timer[playerid] = SetTimerEx("WhileNotInVehicle"1000true"i"playerid);
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    
PauseTimer(timer[playerid]);
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    
ContinueTimer(timer[playerid]);

- You can add additional callbacks for one timer.
Example:
PHP Code:
#include <timerfix>
forward CallbackOne(number);
public 
CallbackOne(number)
{
    
printf("[CallbackOne] Number is %d"number);
}
forward CallbackTwo(number);
public 
CallbackTwo(number)
{
    
printf("[CallbackTwo] Number is %d"number);
}
public 
OnGameModeInit()
{
    new 
timer SetTimerEx("CallbackOne"1000false"i"727);
    
// The same arguments will be passed for both callbacks.
    
AddTimerHandler(timer"CallbackTwo");

- Also added the custom timers with count of executions and delay before the timer starts.
Example:
PHP Code:
#include <timerfix>
new timer;
forward CallbackOne(number);
public 
CallbackOne(number)
{
    
printf("[CallbackOne] Number is %d"number);
}
forward CallbackTwo(number);
public 
CallbackTwo(number)
{
    
printf("[CallbackTwo] Number is %d"number);
    
KillTimer(timer);
}
public 
OnGameModeInit()
{
    
// Set the count to -1 for infinite timer
    
timer SetCustomTimerEx("CallbackOne"10005005"i"800);
    
// The same arguments will be passed for both callbacks.
    
AddTimerHandler(timer"CallbackTwo");

Report about any bugs here please.
Reply
#72

Release updated with this issue fix. Download the latest release again please.

Report about any bugs here please.
Reply
#73

Very nice job, this could be useful
Reply
#74

Quote:
Originally Posted by KashCherry
View Post
- Fixed the problem when timers just stopped.
Well it is not fixed.

My server was running ~16h40mins and then global timer stopped
Reply
#75

Quote:
Originally Posted by UserName12
View Post
Well it is not fixed.

My server was running ~16h40mins and then global timer stopped
The problem is relevant
Reply
#76

error while processing timer: cannot execute public 'Malloc_SolidifyTimer'
how do i fix this?
Reply
#77

if we put a timer

exemple:
PHP Code:
SetTimer("PlayerUpDate",10001); 
the timer stops a few minutes later.
Reply
#78

What is this?

[timerfix.plugin] n_SetTimerEx: bad parameter count (count is 4, should be greater than 5)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)