Raised This Month: $ Target: $400
 0% 

Call public function by string


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 12-30-2013 , 10:16   Re: Call public function by string
Reply With Quote #1

Quote:
Originally Posted by Kia View Post
Why is it silly?
I thought it was reduntant in the caller plugin, but apparently it isn't. You should, as stated, use callfunc_begin_i instead with -1 as the plugin ID.


@Connor: Thanks. If I'm correct, callfunc_end returns what the function called does, right? So check if callfunc_end == PLUGIN_HANDLED and prevent the rest of the code execution if that's the case?
Backstabnoob is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 12-30-2013 , 10:17   AW: Re: Call public function by string
Reply With Quote #2

Quote:
Originally Posted by Backstabnoob View Post
I thought it was reduntant in the caller plugin, but apparently it isn't. You should, as stated, use callfunc_begin_i instead with -1 as the plugin ID.


@Connor: Thanks. If I'm correct, callfunc_end returns what the function called does, right? So check if callfunc_end == PLUGIN_HANDLED and prevent the rest of the code execution if that's the case?
Oh okay.

if(callfunc_begin_i(-1, "myfunc") == 1) // successful
...
else // failed
...
__________________
Kia 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 10:14.


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