am wondering if anyone could help me.... i am new to SMALL and am playing around writing a plugin...
the following is my plugin
Code:
#include <amxmodx>
#include <amxmisc>
#include <sockets>
public plugin_init() {
register_plugin("Admin Call to IRC","0.16","AAA.Gigga")
register_cvar("irc_hostname","<IP HERE>")
register_clcmd("needadmin","needadmin")
register_clcmd("say /needadmin","needadmin")
return PLUGIN_CONTINUE
}
public needadmin(id) {
new name[32],ihostname[20],botcon,error
get_user_name(id,name,32)
get_cvar_string("irc_hostname",ihostname,15)
botcon = socket_open(ihostname, 9090, SOCKET_TCP, error)
if(botcon < 1)
{
server_print("[AMXX] Server [ADMIN] Requested by %s :: Failed :: %s", name, error)
return PLUGIN_HANDLED
}
client_print(0,print_chat,"[AMXX] Server [ADMIN] Requested by %s :: A request for a Server Admin has been sent to #aaa", name)
server_print("[AMXX] Server [ADMIN] Requested by %s :: A request for a Server Admin has been sent to #aaa", name)
socket_close(botcon)
return PLUGIN_CONTINUE
}
what i am trying to do is a socket connect at open of script and close at end, i ave changed it temp to check to see if it works...
without all the socket stull the command works fine in game, on command it frints a message to the id.. all good
soon as i add the socket stuff
i get a error when server loads that says
L 10/30/2004 - 04:06:41: [AMXX] Function not found (name "socket_close") (plugin "pluginname.amx")
if i temp remove socket close i get the same error about socket_open
is there a problem that is realy noticable?
i am using amxx 0.16 and the compiler that it came with
compiling works fine.. no errors
any help would be great