Raised This Month: $12 Target: $400
 3% 

Timer errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zeroibis
Veteran Member
Join Date: Jun 2007
Old 11-26-2008 , 02:00   Timer errors
Reply With Quote #1

I have two mods that use timers but I appear to be getting the following errors:

Code:
L 11/25/2008 - 00:00:35: [SM] Plugin "autoeq.smx" encountered error 23: Native detected error
L 11/25/2008 - 00:00:35: [SM] Invalid data handle 2 (error 7) passed during timer end
L 11/25/2008 - 00:00:35: [SM] Unable to call function "GiveEquipment" due to above error(s).

and

Invalid data handle d (error 1) passed during timer end
L 11/25/2008 - 00:11:26: [SM] Unable to call function "expire_onFire" due to above error(s).
The timers I am using are:
Code:
CreateTimer(0.1,GiveEquipment,client,TIMER_HNDL_CLOSE);
CreateTimer(time,expire_onFire,client,TIMER_HNDL_CLOSE);
(time is a float value)
__________________
zeroibis is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-26-2008 , 02:14   Re: Timer errors
Reply With Quote #2

Try without using TIMER_HNDL_CLOSE.
bl4nk is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 11-26-2008 , 06:31   Re: Timer errors
Reply With Quote #3

if you still keep TIMER_HNDL_CLOSE create a data pack with CreateDataPack() and insert client with WritePackCell() then pass data through CreateTimer.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
zeroibis
Veteran Member
Join Date: Jun 2007
Old 11-26-2008 , 19:48   Re: Timer errors
Reply With Quote #4

Quote:
Originally Posted by bl4nk View Post
Try without using TIMER_HNDL_CLOSE.
I tired that first it gives an error:
Code:
Plugin "autoeq.smx" encountered error 23: Native detected error
L 11/26/2008 - 01:46:34: [SM] Invalid timer handle c1ab0080 (error 3) during timer end, displayed function is timer callback, not the stack trace
L 11/26/2008 - 01:46:34: [SM] Unable to call function "GiveEquipment" due to above error(s).
Edit:I found another error that was caused this error when I removed the TIMER_HNDL_CLOSE

For now it looks like my plugins are running with little to no errors, thanks!
__________________

Last edited by zeroibis; 11-26-2008 at 20:55.
zeroibis is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 12-02-2008 , 14:14   Re: Timer errors
Reply With Quote #5

I prefer putting "return Plugin_Stop;" at end of timers. It'll stop the timer if needed and won't generate errors. Also closes it's handle.
Sammy-ROCK! is offline
Rasmus4J
Junior Member
Join Date: Jul 2009
Location: Denmark, Kolding
Old 07-20-2009 , 12:03   Re: Timer errors
Reply With Quote #6

can anyone see why this:
PHP Code:
CreateTimer(60.0ChecknamekickclientTIMER_HNDL_CLOSE); 
would give me error: Prototypes do not match^?
Rasmus4J is offline
Send a message via MSN to Rasmus4J Send a message via Skype™ to Rasmus4J
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 07-20-2009 , 12:13   Re: Timer errors
Reply With Quote #7

Show us your callback function.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
Rasmus4J
Junior Member
Join Date: Jul 2009
Location: Denmark, Kolding
Old 07-20-2009 , 12:22   Re: Timer errors
Reply With Quote #8

PHP Code:
public Action:Checknamekick(Handle:timerclient)
{
    new 
client_id1 GetClientUserId(client)
    new 
client1 GetClientOfUserId(client_id1)
    
decl String:client_name1[256]
    
GetClientName(client1client_name1sizeof(client_name1))
    if (
StrContains(client_name1"Koshy"false)!=-1)
    {
        if (
StrContains(client_name1"love"false)!=-1)
        {
            
PrintToChat(client"You have the words: Koshy & love, in your name. You have 1 minute to change it or get kicked!")
            
PrintToChatAll("%s has the words: Koshy & love, in his/her name, lets all point fingers and say bye bye! :D")
            
PrintToChat(client"You will now be kicked!")
            
decl String:serverip[128]
            
KickClient(client"You have been kicked from server %s for having the words Koshy and Love in your name"0serverip)
        }
        else
        {
            
PrintToChat(client"Nice to see you having changed name")
        }
    }

here it is.
Rasmus4J is offline
Send a message via MSN to Rasmus4J Send a message via Skype™ to Rasmus4J
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 07-20-2009 , 12:24   Re: Timer errors
Reply With Quote #9

PHP Code:
public Action:Checknamekick(Handle:timerany:client
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
Rasmus4J
Junior Member
Join Date: Jul 2009
Location: Denmark, Kolding
Old 07-20-2009 , 12:26   Re: Timer errors
Reply With Quote #10

Quote:
Originally Posted by exvel View Post
PHP Code:
public Action:Checknamekick(Handle:timerany:client
lol did not think that was needed well, thanks, again
Rasmus4J is offline
Send a message via MSN to Rasmus4J Send a message via Skype™ to Rasmus4J
Reply



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

Forum Jump


All times are GMT -4. The time now is 08:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode