[Plugin] Timer Fix
#21

Quote:
Originally Posted by must006
View Post
I use "exit" command in samp-server.exe but don't work. I think SetTimer, SetTimerEx have a bug. I try to login my localhost server and failed:
Code:
Kicking 127.0.0.1 because they didn't logon to the game.
Now, I use v0.9 and no this problem.
Oops... Fixed

Quote:
Originally Posted by Y_Less
View Post
Has this been fixed to work with any other include yet?
Yes, i suppose.
Reply
#22

Quote:

Has this been fixed to work with any other include yet?

No, it is still bugged.


Code:
Code:
#include <a_samp>
#include <crashdetect>
#include <fixes>
#include <timerfix>
#include <YSI\y_timers>

main()
{
	SetGameModeText("Test Server");
}

public OnGameModeInit()
{	
	SetTimer("Test", 1000, true);
	return 1;
}

forward Test(); 
public Test()
{
	print("111");
	return 1;
}
Without fixes.inc and y_timers works perfectly.
Reply
#23

Quote:
Originally Posted by Injury
View Post
No, it is still bugged.


Code:
Code:
#include <a_samp>
#include <crashdetect>
#include <fixes>
#include <timerfix>
#include <YSI\y_timers>

main()
{
	SetGameModeText("Test Server");
}

public OnGameModeInit()
{	
	SetTimer("Test", 1000, true);
	return 1;
}

forward Test(); 
public Test()
{
	print("111");
	return 1;
}
Without fixes.inc and y_timers works perfectly.
YSF too fix timers, isn't it?
Reply
#24

I don't know, sorry!!!
Reply
#25

[Timer Fix plugin] KillTimer: Cannot find timer with id 0
Reply
#26

Quote:
Originally Posted by Salik
View Post
[Timer Fix plugin] KillTimer: Cannot find timer with id 0
For this problem, there is a native function
PHP Code:
native IsValidTimer(timerid); 
Or use 1 instead of 0. Look at timer fix code:
PHP Code:
int Timer::gTimerID 0;
////////////////////////////////////////////////
gTimerID++;
return 
gTimerID
Reply
#27

The fact is that using the plugin from Dan's everything is fine, put your then such a mistake, I do not even know where it is and what is the problem...
Reply
#28

Quote:
Originally Posted by Salik
View Post
The fact is that using the plugin from Dan's everything is fine, put your then such a mistake, I do not even know where it is and what is the problem...
What are you talking about? If you use it this way:
PHP Code:
new timer;
public 
OnGameModeInit()
{
    
timer SetTimer("func"1000false);
}
forward func();
public 
func()
{
    
KillTimer(timer);

And have this error, then problem is really in plugin. But if you use it like this:
PHP Code:
KillTimer(0); 
Then i don't know, what is your problem...
Reply
#29

I have timers created in 1 principle, the problem is in the plugin (I think), with the plugin from Dan's all right!
Reply
#30

I'm compile with params -d3 | -d2 and use Crashdetect...

PHP Code:
[11:04:14] [debugServer crashed due to an unknown error
[11:04:14] [debugNative backtrace:
[
11:04:14] [debug#0 0f293339 in ?? () from plugins\streamer.DLL
[11:04:14] [debug#1 0fec280d in ?? () from plugins\timerfix.DLL
[11:04:14] [debug#2 0fec31d5 in ?? () from plugins\timerfix.DLL
[11:04:14] [debug#3 00469c16 in ?? () from samp-server.exe
[11:04:14] [debug#4 00492cab in ?? () from samp-server.exe
[11:04:14] [debug#5 004a1d61 in ?? () from samp-server.exe
[11:04:14] [debug#6 004a1d71 in ?? () from samp-server.exe
[11:04:14] [debugRegisters:
[
11:04:14] [debugEAX01edef20 EBX00000000 ECX01ede948 EDX0f2e34f0
[11:04:14] [debugESI01f24710 EDI00000078 EBP004a1d61 ESP0014fe98
[11:04:14] [debugEIP004a1d71 EFLAGS00010207
[11:04:14] [debugStack:
[
11:04:14] [debugESP+00000000004b1e20 0014ff70 004b1a1c ffffffff
[11:04:14] [debugESP+0000002000000094 00000006 00000002 000023f0
[11:04:14] [debugESP+0000004000000000 00000000 00000000 00000000
[11:04:14] [debugESP+0000006000000000 00000000 00000000 00000000
[11:04:14] [debugESP+0000008000000000 00000000 00000000 00000000
[11:04:14] [debugESP+000000a000000000 00000000 00000000 00000000
[11:04:14] [debugESP+000000c000000000 00000000 c0000005 00000000
[11:04:14] [debugESP+000000e0004c0790 00000000 0014ff94 767a8e94
[11:04:14] [debugESP+0000010076fc9bc3 00224000 1c0123d2 00000000
[11:04:14] [debugESP+0000012000000000 00000000 1c0123d2 0014ffa0
[11:04:14] [debugESP+0000014000000000 0014ffec 76fc9b92 ffffffff
[11:04:14] [debugESP+0000016000224000 00000000 78746341 00000020
[11:04:14] [debugESP+0000018000000020 00000000 00000014 00000001
[11:04:14] [debugESP+000001a000000000 00000000 00000000 00000000
[11:04:14] [debugESP+000001c000000044 000002e0 00000254 00000000
[11:04:14] [debugESP+000001e000000336 00000000 2d59495b 000008b8
[11:04:14] [debugESP+0000020032ceeacd 00000be8 00000042 00000c2c
[11:04:14] [debugESP+000002200000005e 00000fbc 00000356 00000000
[11:04:14] [debugESP+0000024000000392 00000010 00000009 000000ec
[11:04:14] [debugESP+0000026000000001 00000002 00001738 000004b4
[11:04:14] [debugESP+0000028000000001 00000004 00002a78 00000314
[11:04:14] [debugESP+000002a000000002 00000006 00002e24 000000cc
[11:04:14] [debugESP+000002c000000001 00000009 00002fe0 00000028
[11:04:14] [debugESP+000002e000000001 64487353 0000002c 00000001
[11:04:14] [debugESP+0000030000000001 00001584 0000002c 0000005e
[11:04:14] [debugESP+0000032000000000 00000000 00000000 00000000
[11:04:14] [debugESP+0000034000000038 00000000 003a0043 0057005c
[11:04:14] [debugESP+00000360006e0069 00780053 005c0073 00000000
[11:04:14] [debugESP+0000038000000254 00000001 f33271ba 000003b8
[11:04:14] [debugESP+000003a02d59495b 0000073c 00000032 00000770
[11:04:14] [debugESP+000003c000000042 00000ab0 00000330 00000004
[11:04:14] [debugESP+000003e000000356 00000005 b1280544 00001198 
Reply
#31

Quote:
Originally Posted by Salik
View Post
I'm compile with params -d3 | -d2 and use Crashdetect...

PHP Code:
[11:04:14] [debugServer crashed due to an unknown error
[11:04:14] [debugNative backtrace:
[
11:04:14] [debug#0 0f293339 in ?? () from plugins\streamer.DLL
[11:04:14] [debug#1 0fec280d in ?? () from plugins\timerfix.DLL
[11:04:14] [debug#2 0fec31d5 in ?? () from plugins\timerfix.DLL
[11:04:14] [debug#3 00469c16 in ?? () from samp-server.exe
[11:04:14] [debug#4 00492cab in ?? () from samp-server.exe
[11:04:14] [debug#5 004a1d61 in ?? () from samp-server.exe
[11:04:14] [debug#6 004a1d71 in ?? () from samp-server.exe
[11:04:14] [debugRegisters:
[
11:04:14] [debugEAX01edef20 EBX00000000 ECX01ede948 EDX0f2e34f0
[11:04:14] [debugESI01f24710 EDI00000078 EBP004a1d61 ESP0014fe98
[11:04:14] [debugEIP004a1d71 EFLAGS00010207
[11:04:14] [debugStack:
[
11:04:14] [debugESP+00000000004b1e20 0014ff70 004b1a1c ffffffff
[11:04:14] [debugESP+0000002000000094 00000006 00000002 000023f0
[11:04:14] [debugESP+0000004000000000 00000000 00000000 00000000
[11:04:14] [debugESP+0000006000000000 00000000 00000000 00000000
[11:04:14] [debugESP+0000008000000000 00000000 00000000 00000000
[11:04:14] [debugESP+000000a000000000 00000000 00000000 00000000
[11:04:14] [debugESP+000000c000000000 00000000 c0000005 00000000
[11:04:14] [debugESP+000000e0004c0790 00000000 0014ff94 767a8e94
[11:04:14] [debugESP+0000010076fc9bc3 00224000 1c0123d2 00000000
[11:04:14] [debugESP+0000012000000000 00000000 1c0123d2 0014ffa0
[11:04:14] [debugESP+0000014000000000 0014ffec 76fc9b92 ffffffff
[11:04:14] [debugESP+0000016000224000 00000000 78746341 00000020
[11:04:14] [debugESP+0000018000000020 00000000 00000014 00000001
[11:04:14] [debugESP+000001a000000000 00000000 00000000 00000000
[11:04:14] [debugESP+000001c000000044 000002e0 00000254 00000000
[11:04:14] [debugESP+000001e000000336 00000000 2d59495b 000008b8
[11:04:14] [debugESP+0000020032ceeacd 00000be8 00000042 00000c2c
[11:04:14] [debugESP+000002200000005e 00000fbc 00000356 00000000
[11:04:14] [debugESP+0000024000000392 00000010 00000009 000000ec
[11:04:14] [debugESP+0000026000000001 00000002 00001738 000004b4
[11:04:14] [debugESP+0000028000000001 00000004 00002a78 00000314
[11:04:14] [debugESP+000002a000000002 00000006 00002e24 000000cc
[11:04:14] [debugESP+000002c000000001 00000009 00002fe0 00000028
[11:04:14] [debugESP+000002e000000001 64487353 0000002c 00000001
[11:04:14] [debugESP+0000030000000001 00001584 0000002c 0000005e
[11:04:14] [debugESP+0000032000000000 00000000 00000000 00000000
[11:04:14] [debugESP+0000034000000038 00000000 003a0043 0057005c
[11:04:14] [debugESP+00000360006e0069 00780053 005c0073 00000000
[11:04:14] [debugESP+0000038000000254 00000001 f33271ba 000003b8
[11:04:14] [debugESP+000003a02d59495b 0000073c 00000032 00000770
[11:04:14] [debugESP+000003c000000042 00000ab0 00000330 00000004
[11:04:14] [debugESP+000003e000000356 00000005 b1280544 00001198 
The problem is that the standard timers are not removed after the restart, can you do?
---
After adding to OnGameModeExit-Kill All Timers();. Displays the following in the console [12:00:45] [debug] Run time error 9: "No (valid) native function callback"
Reply
#32

Plugin updated to version 1.1

- Added array support

Quote:
Originally Posted by Salik
View Post
The problem is that the standard timers are not removed after the restart, can you do?
---
After adding to OnGameModeExit-Kill All Timers();. Displays the following in the console [12:00:45] [debug] Run time error 9: "No (valid) native function callback"
Try last release from releases page.
Reply
#33

I would like to have more compatibility with the plugin Udan.

In the Settings native SetTimerEx - delay, count, repeating.

Add native function -
GetTimerFunctionName, (Get/Set)TimerInterval, GetTimerIntervalLeft, (Get/Set)TimerCount , SetTimerDelay, GetTimerCallsLeft.

Add also the flags in build options of the timer, then you can remove/change timers wth the flags. Example -
PHP Code:
 SetTimerEx(func[], intervalrepeatingflags:ABC, const format[], {Float,_}:...); 
 
KillTimers(flags:ABC); 
 
SetTimersDelay(flags:ABC2000); 
Reply
#34

When I try to load timerfix.so its working but its stoped in:
Quote:

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[02:55:53] filterscripts = "" (string)
[02:55:53]
[02:55:53] Server Plugins
[02:55:53] --------------
[02:55:53] Loading plugin: crashdetect.so
[02:55:53] CrashDetect v4.18.1 is OK.
[02:55:53] Loaded.
[02:55:53] Loading plugin: streamer.so
[02:55:53]

*** Streamer Plugin v2.9.3 by Incognito loaded ***

[02:55:53] Loaded.
[02:55:53] Loading plugin: timerfix.so
[02:55:53] [Timer Fix plugin] by KashCherry loaded. Version: 1.1
[02:55:53] Loaded.
[02:55:53] Loading plugin: pawnraknet.so
[02:55:53] Pawn.RakNet plugin v1.2.0 by urShadow loaded
[02:55:53] Loaded.
[02:55:53] Loaded 4 plugins.

[02:55:53]
[02:55:53] Filterscripts
[02:55:53] ---------------
[02:55:53] Loaded 0 filterscripts.
Reply
#35

Quote:
Originally Posted by GuyYahood1
View Post
When I try to load timerfix.so its working but its stoped in:
The plugin is correctly loaded:

Code:
[02:55:53] Loading plugin: timerfix.so
[02:55:53] [Timer Fix plugin] by KashCherry loaded. Version: 1.1
[02:55:53] Loaded.
Reply
#36

Quote:
Originally Posted by Dayrion
View Post
The plugin is correctly loaded:

Code:
[02:55:53] Loading plugin: timerfix.so
[02:55:53] [Timer Fix plugin] by KashCherry loaded. Version: 1.1
[02:55:53] Loaded.
Its loaded but the server stop work after loaded filter scripts...
Without the plugin the server work.
Reply
#37

PHP Code:
GetTimerRemainingTime(timerid); 
This would be pretty awesome. Using like the unix timestamp at starting the timer & the actual timestamp at the call of the function & then calculating the difference.

So i don't need to use my self made function anymore
Reply
#38

Nice plugin
Reply
#39

nice plugin ++
Reply
#40

Plugin updated to version 1.02
Releases page
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)