Raised This Month: $ Target: $400
 0% 

FuncIdx question.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hebusletroll
Senior Member
Join Date: Apr 2006
Old 08-04-2008 , 10:48   FuncIdx question.
Reply With Quote #1

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.
__________________
Boring about playing same weapons ? PowerWeapons is available !
PowerWeapon v1.0 released !
Play up to 70 new weapons and create your own weapons !
Tested on Windows Server 2003, 2008/R2, 2012 and Linux Ubuntu 10.x and CentOs 6.x
hebusletroll is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2008 , 10:51   Re: FuncIdx question.
Reply With Quote #2

Try http://www.amxmodx.org/funcwiki.php?go=func&id=221
__________________
Arkshine is offline
hebusletroll
Senior Member
Join Date: Apr 2006
Old 08-04-2008 , 11:47   Re: FuncIdx question.
Reply With Quote #3

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.

__________________
Boring about playing same weapons ? PowerWeapons is available !
PowerWeapon v1.0 released !
Play up to 70 new weapons and create your own weapons !
Tested on Windows Server 2003, 2008/R2, 2012 and Linux Ubuntu 10.x and CentOs 6.x
hebusletroll is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 08-04-2008 , 12:23   Re: FuncIdx question.
Reply With Quote #4

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.
__________________
No support via PM.

Last edited by Lee; 08-04-2008 at 12:26.
Lee is offline
hebusletroll
Senior Member
Join Date: Apr 2006
Old 08-04-2008 , 13:13   Re: FuncIdx question.
Reply With Quote #5

Thank you very much Lee ! That excatly what I want !

Great great great !!!!

+ Karma for you ^^
__________________
Boring about playing same weapons ? PowerWeapons is available !
PowerWeapon v1.0 released !
Play up to 70 new weapons and create your own weapons !
Tested on Windows Server 2003, 2008/R2, 2012 and Linux Ubuntu 10.x and CentOs 6.x
hebusletroll is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2008 , 14:22   Re: FuncIdx question.
Reply With Quote #6

I had the good answer.

Like said the wiki :

Quote:
-1 - Plugin not found
-2 - Function not found"
__________________
Arkshine is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-04-2008 , 16:35   Re: FuncIdx question.
Reply With Quote #7

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.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
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 05:38.


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