Right this is a simple enough question, but its the first time ive done it and i cant get it to work :/
OK, what i want to do is call a function in one plugin from another plugin. In this instance i want to modify my ATAC plugin to send a message to my IRC plugin.
So in my IRC plugin ive added this code:
Code:
register_srvcmd("amx_ircmsg_kick", "inform_kick")
public inform_kick() {
if (INFORMKICK)
{
new channel[64]
get_cvar_string("amx_irc_chan", channel, 63)
new victim[32]
read_argv(1, victim, 31)
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)
}
}
And in my ATAC plugin ive added this:
Code:
server_cmd("amx_ircmsg_kick %s", kName)
Now, when this function should be called by the ATAC plugin it doesnt work. When i try to force it to work by typing the 'amx_ircmsg_kick' command by hand i get these errors:
Quote:
rcon amx_ircmsg_kick Test
L 02/03/2005 - 10:48:48: [AMXX] Run time error 25 (parameter error) (plugin "ircbot.amxx") - debug not enabled.
L 02/03/2005 - 10:48:48: String formatted incorrectly - parameter 6 (total 5)
L 02/03/2005 - 10:48:48: [AMXX] To enable debug mode, add " debug" after the plugin name in plugins.ini (without quot
|
So how can i get this to work?? Thanks for any help
Damo.