Raised This Month: $ Target: $400
 0% 

Calling Functions from other plugins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Damocles
Member
Join Date: Jan 2005
Old 02-04-2005 , 07:03  
Reply With Quote #6

OK, Ive tried using callfunc and i cant seem to get it to work, heres what ive got..

Code:
client_print(0, print_chat, "CLIENT ABOUT TO BE KICKED!")         callfunc_begin("inform_kick", "ircbot.amxx"); callfunc_push_str(kName); new returnvalue = callfunc_end(); switch (returnvalue) {     case 1 : client_print(0, print_chat, "Success")     case 2 : client_print(0, print_chat, "Runtime Error")     case 3 : client_print(0, print_chat, "Plugin not found")     case 4 : client_print(0, print_chat, "Function not found") }

That (should) execute the 'inform_kick' function in ircbot.amxx. Note that ive put in the case for my own bug checking at the moment to see if it prints any output....i get nothing at the moment, although i know the code must be getting called because 'CLIENT ABOUT TO BE KICKED!' is displayed.

It must be something to do with the above because its not priting any of the return values after it should have executed the function

Heres the code for the 'inform_kick' function

Code:
public inform_kick(victim[]) {     new channel[64]     get_cvar_string("amx_irc_chan", channel, 63)     new output[1024]         format(output, 1023, "PRIVMSG %s :4[cz]1 %s : Kicking %s For TK Violations^n", channel, victim)         socket_send(connection, output, 1023) }

Anyone got any suggestions, something else i should be doing ??

Thanks

Damo.
Damocles 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 19:26.


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