I have a problem.... i was following a tutorial on how to make
amx_kick and the code in the tutorial compiles fine so i rewrote it without peaking and got like 3 errors. Then i looked over the code and i couldt find anything wrong...
my code:
Code:
#include <amxmodx>
public plugin_init() {
register_plugin("AMX KICK", "1.0", "Author")
register_concmd("amx_kicked","kicked",ADMIN_KICK," :Kicks the certainplayer")
}
public kicked(id) {
if(!(get_user_flags(id)&ADMIN_KICK)) {
console_print(id, "[AMXX] You have no access to this command")
return PLUGIN_HANDLED
}
if(read_argc() == 0) {
console_print(id, "[AMXX] You did not select a user")
return PLUGIN_HANDLED
}
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if (uid == 0) {
console_print(id,"[AMXX] You selected an invalid user")
return PLUGIN_HANDLED
}
client_cmd(uid,"echo You have been kicked.")
client_cmd(uid,"disconnect")
print_console(id,"[AMXX] Client has been kicked.")
return PLUGIN_HANDLED
}
the errors i get are:
Code:
/home/groups/amxmodx/tmp3/textDiQNvk.sma(26) : error 012: invalid function call, not a valid address
/home/groups/amxmodx/tmp3/textDiQNvk.sma(26) : warning 215: expression has no effect
/home/groups/amxmodx/tmp3/textDiQNvk.sma(26) : warning 215: expression has no effect
/home/groups/amxmodx/tmp3/textDiQNvk.sma(26) : error 001: expected token: ";", but found ")"
/home/groups/amxmodx/tmp3/textDiQNvk.sma(26) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp3/textDiQNvk.sma(26) : fatal error 107: too many error messages on one line
Compilation aborted.
4 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textDiQNvk.amx (compile failed).
Someone please help. I have a feeling it is a dumb mistake.
__________________