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. |
Has this been fixed to work with any other include yet? |
#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; }
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; } |
native IsValidTimer(timerid);
int Timer::gTimerID = 0;
////////////////////////////////////////////////
gTimerID++;
return gTimerID;
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...
|
new timer;
public OnGameModeInit()
{
timer = SetTimer("func", 1000, false);
}
forward func();
public func()
{
KillTimer(timer);
}
KillTimer(0);
[11:04:14] [debug] Server crashed due to an unknown error
[11:04:14] [debug] Native 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] [debug] Registers:
[11:04:14] [debug] EAX: 01edef20 EBX: 00000000 ECX: 01ede948 EDX: 0f2e34f0
[11:04:14] [debug] ESI: 01f24710 EDI: 00000078 EBP: 004a1d61 ESP: 0014fe98
[11:04:14] [debug] EIP: 004a1d71 EFLAGS: 00010207
[11:04:14] [debug] Stack:
[11:04:14] [debug] ESP+00000000: 004b1e20 0014ff70 004b1a1c ffffffff
[11:04:14] [debug] ESP+00000020: 00000094 00000006 00000002 000023f0
[11:04:14] [debug] ESP+00000040: 00000000 00000000 00000000 00000000
[11:04:14] [debug] ESP+00000060: 00000000 00000000 00000000 00000000
[11:04:14] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
[11:04:14] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
[11:04:14] [debug] ESP+000000c0: 00000000 00000000 c0000005 00000000
[11:04:14] [debug] ESP+000000e0: 004c0790 00000000 0014ff94 767a8e94
[11:04:14] [debug] ESP+00000100: 76fc9bc3 00224000 1c0123d2 00000000
[11:04:14] [debug] ESP+00000120: 00000000 00000000 1c0123d2 0014ffa0
[11:04:14] [debug] ESP+00000140: 00000000 0014ffec 76fc9b92 ffffffff
[11:04:14] [debug] ESP+00000160: 00224000 00000000 78746341 00000020
[11:04:14] [debug] ESP+00000180: 00000020 00000000 00000014 00000001
[11:04:14] [debug] ESP+000001a0: 00000000 00000000 00000000 00000000
[11:04:14] [debug] ESP+000001c0: 00000044 000002e0 00000254 00000000
[11:04:14] [debug] ESP+000001e0: 00000336 00000000 2d59495b 000008b8
[11:04:14] [debug] ESP+00000200: 32ceeacd 00000be8 00000042 00000c2c
[11:04:14] [debug] ESP+00000220: 0000005e 00000fbc 00000356 00000000
[11:04:14] [debug] ESP+00000240: 00000392 00000010 00000009 000000ec
[11:04:14] [debug] ESP+00000260: 00000001 00000002 00001738 000004b4
[11:04:14] [debug] ESP+00000280: 00000001 00000004 00002a78 00000314
[11:04:14] [debug] ESP+000002a0: 00000002 00000006 00002e24 000000cc
[11:04:14] [debug] ESP+000002c0: 00000001 00000009 00002fe0 00000028
[11:04:14] [debug] ESP+000002e0: 00000001 64487353 0000002c 00000001
[11:04:14] [debug] ESP+00000300: 00000001 00001584 0000002c 0000005e
[11:04:14] [debug] ESP+00000320: 00000000 00000000 00000000 00000000
[11:04:14] [debug] ESP+00000340: 00000038 00000000 003a0043 0057005c
[11:04:14] [debug] ESP+00000360: 006e0069 00780053 005c0073 00000000
[11:04:14] [debug] ESP+00000380: 00000254 00000001 f33271ba 000003b8
[11:04:14] [debug] ESP+000003a0: 2d59495b 0000073c 00000032 00000770
[11:04:14] [debug] ESP+000003c0: 00000042 00000ab0 00000330 00000004
[11:04:14] [debug] ESP+000003e0: 00000356 00000005 b1280544 00001198
I'm compile with params -d3 | -d2 and use Crashdetect...
PHP Code:
|
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" |
SetTimerEx(func[], interval, repeating, flags:ABC, const format[], {Float,_}:...);
KillTimers(flags:ABC);
SetTimersDelay(flags:ABC, 2000);
---------- 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. |
When I try to load timerfix.so its working but its stoped in:
|
[02:55:53] Loading plugin: timerfix.so [02:55:53] [Timer Fix plugin] by KashCherry loaded. Version: 1.1 [02:55:53] Loaded.
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. |
GetTimerRemainingTime(timerid);