AlliedModders

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

hebusletroll 08-04-2008 10:48

FuncIdx question.
 
Hi all !

Is there any way to check if a public function exists in another plugin ?

I can't use funcIdx to get this functionnality.

Thanks.

Arkshine 08-04-2008 10:51

Re: FuncIdx question.
 
Try http://www.amxmodx.org/funcwiki.php?go=func&id=221

hebusletroll 08-04-2008 11:47

Re: FuncIdx question.
 
Hello Arkshine,

No, this is not my request ^^

I know that callfunc_begin is able to call a function in another plugin (i use it for PowerWeapons), the problem is that i want to test it with a funcidx way preventing raising an exception error if function was not found.

:)

Lee 08-04-2008 12:23

Re: FuncIdx question.
 
Yes, that is the answer to your request. You can either use the AMX Mod X error handler (you'd be the first person I've seen to do so), or much more simply, do this;

Code:
new callSuccess = callfunc_begin("sayNextMap", "nextmap.amxx"); if(callSuccess < 0) {     server_print("CallFunc Error: %s not found.", callSuccess == -1 ? "Plugin" : "Function");     return; } callfunc_end();
This should be obvious after reading the documentation.

hebusletroll 08-04-2008 13:13

Re: FuncIdx question.
 
Thank you very much Lee ! That excatly what I want !

Great great great !!!!

+ Karma for you ^^

Arkshine 08-04-2008 14:22

Re: FuncIdx question.
 
I had the good answer. :mrgreen:

Like said the wiki :

Quote:

-1 - Plugin not found
-2 - Function not found"

Xanimos 08-04-2008 16:35

Re: FuncIdx question.
 
It's ok arkshine, I know you gave him the answer he needed. He just didn't take the time to read the link you gave him.


All times are GMT -4. The time now is 05:38.

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