Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] ZSpawn: Zombie Spawn manager (v1.2.5)[09-Mar-2021]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-06-2021 , 05:24   Re: [L4D2] ZSpawn: Zombie Spawn manager (v1.1)[05-May-2021]
Reply With Quote #11

You should be setting the timer handle to null in the timer callback if you're closing the timer, which you do in the first two lines of the timer callback code. See the [TUT] SourcePawn Scripting - Tips, Basics to Advanced thread for details on dealing with timer handles and ways to use them without issues. You can call "delete g_hSpawnTimer" multiple times since delete closes the timer if it's a valid handle and sets g_hSpawnTimer to null.


Edit: You're also leaking ray trace handles by never deleting them:

Quote:
TR_TraceRayFilterEx
Return Value

Ray trace handle, which must be closed via CloseHandle() or delete.

Also couple spelling mistakes (just pointing out to help you):

succefully > successfully
oposite > opposite
wich > which
commads > commands
Minium > Minimum
__________________

Last edited by Silvers; 05-06-2021 at 05:33.
Silvers is offline
 



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:22.


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