Raised This Month: $ Target: $400
 0% 

Help a newbie


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Deadman0o06
Member
Join Date: Jun 2006
Old 06-25-2006 , 19:37   Help a newbie
Reply With Quote #1

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.
__________________
Deadman0o06 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-25-2006 , 19:59   Re: Help a newbie
Reply With Quote #2

It's console_print, not print_console ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Deadman0o06
Member
Join Date: Jun 2006
Old 06-25-2006 , 21:42   Re: Help a newbie
Reply With Quote #3

Oh silly me lol... let me try to compile now....yay it worked. love ya
__________________
Deadman0o06 is offline
Reply



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 07:56.


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