Raised This Month: $ Target: $400
 0% 

KillTimer - mapvote


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zerak
Senior Member
Join Date: Feb 2008
Old 06-16-2008 , 10:42   KillTimer - mapvote
Reply With Quote #1

Having problem with mapvote not working in TF2 but working fine in CSS.
Someone showed this error:

Code:
                              L 05/18/2008 - 22:55:41: [SM] Native "KillTimer" reported: Invalid timer handle 7280077 (error 3)
L 05/18/2008 - 22:55:41: [SM] Displaying call stack trace for plugin "mapvote.smx":
L 05/18/2008 - 22:55:41: [SM]   [0]  Line 311, /home/srcds/tf/addons/sourcemod/scripting/include/voteManager.inc::VoteEnded()
L 05/18/2008 - 22:55:41: [SM]   [1]  Line 301, /home/srcds/tf/addons/sourcemod/scripting/include/voteManager.inc::VoteAction()
This is the only place where the variable in question is closed through KillTimer or CloseHandle and since it is tested with the if statment and then set to invalid after being closed I thought it would be bulletproof.

Code:
VoteEnded()
{
    g_runningVote = false
    if( g_ShowVotes_timer != INVALID_HANDLE )
    {
        KillTimer(g_ShowVotes_timer)
        g_ShowVotes_timer = INVALID_HANDLE
    }
}
Attached Files
File Type: inc voteManager.inc (11.2 KB, 158 views)
zerak is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 06-16-2008 , 11:27   Re: KillTimer - mapvote
Reply With Quote #2

It gets closed by the core on mapchange.

Code:
g_ShowVotes_timer = CreateTimer(1.0, ShowVoteProgress, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE)
__________________
plop
p3tsin is offline
zerak
Senior Member
Join Date: Feb 2008
Old 06-16-2008 , 12:39   Re: KillTimer - mapvote
Reply With Quote #3

Will votes not be ended before mapchange then? Thank you for noticing
zerak is offline
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 21:50.


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