AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   register_forward (https://forums.alliedmods.net/showthread.php?t=147956)

Flipper_SPb 01-16-2011 09:48

register_forward
 
I have:


PHP Code:

new g_Forw


public somefunc()
{
       
g_Forw register_forward ( ............ )


Should I check is forward registered, before I make unregister_forward() inside other function?
Or I can make unregister_forward ( forwardType, g_Forw ) without checking g_Forw pointer?

Arkshine 01-16-2011 09:57

Re: register_forward
 
You don't need to check. It will throw an error if you provide an invalid function. But for the forward index (handle), if not found the native will simply return 0.

Flipper_SPb 01-16-2011 10:22

Re: register_forward
 
Thank you!


All times are GMT -4. The time now is 02:11.

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