SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 05/06/2018, 03:58 PM   #41
KashCherry
Little Clucker
 
KashCherry's Avatar
 
Join Date: Feb 2018
Location: Estonia
Posts: 29
Reputation: 19
Default Re: Timer Fix

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...
KashCherry is offline   Reply With Quote
Old 05/06/2018, 07:49 PM   #42
Salik
Big Clucker
 
Salik's Avatar
 
Join Date: Aug 2015
Location: Russia
Posts: 87
Reputation: 0
Default Re: Timer Fix

I have timers created in 1 principle, the problem is in the plugin (I think), with the plugin from Dan's all right!
Salik is offline   Reply With Quote
Old 06/06/2018, 05:17 AM   #43
Salik
Big Clucker
 
Salik's Avatar
 
Join Date: Aug 2015
Location: Russia
Posts: 87
Reputation: 0
Default Re: Timer Fix

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 

Last edited by Salik; 06/06/2018 at 06:07 AM.
Salik is offline   Reply With Quote
Old 06/06/2018, 07:04 AM   #44
Salik
Big Clucker
 
Salik's Avatar
 
Join Date: Aug 2015
Location: Russia
Posts: 87
Reputation: 0
Default Re: Timer Fix

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"
Salik is offline   Reply With Quote
Old 06/06/2018, 07:59 PM   #45
KashCherry
Little Clucker
 
KashCherry's Avatar
 
Join Date: Feb 2018
Location: Estonia
Posts: 29
Reputation: 19
Default Re: Timer Fix

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.
KashCherry is offline   Reply With Quote
Old 07/06/2018, 06:24 AM   #46
Salik
Big Clucker
 
Salik's Avatar
 
Join Date: Aug 2015
Location: Russia
Posts: 87
Reputation: 0
Thumbs up Re: Timer Fix

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); 

Last edited by Salik; 07/06/2018 at 02:49 PM.
Salik 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 07:22 PM
Performance Question , Per Player Timer vs Timer that loops through all players BiosMarcel Scripting Help 14 12/12/2016 09:50 AM
If /foodsearch doesn't find item, set wait timer (TIMER HELP) Josh_Main Scripting Help 7 14/09/2016 04:13 PM
Which is better Per Player Timer or Global timer? (issue with timer) Dokins Scripting Help 4 07/06/2016 09:50 AM
Slice's Timer Fix include --> timer public function isn't getting called Riwerry Scripting Help 0 02/01/2016 03:50 PM


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


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