AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help a newbie (https://forums.alliedmods.net/showthread.php?t=40289)

Deadman0o06 06-25-2006 19:37

Help a newbie
 
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.:(

v3x 06-25-2006 19:59

Re: Help a newbie
 
It's console_print, not print_console ;)

Deadman0o06 06-25-2006 21:42

Re: Help a newbie
 
Oh silly me lol... let me try to compile now....yay it worked. love ya :D


All times are GMT -4. The time now is 07:56.

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