Raised This Month: $ Target: $400
 0% 

command recognized, but not...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BigWalnutZ
Junior Member
Join Date: Apr 2005
Old 04-15-2005 , 15:10   command recognized, but not...
Reply With Quote #1

Titles confusing, sorry, but I am confused also. Currently I have a plugin simply repeating what I enter as args.
Example:
amx_whois ding

It does the correct functions and does what I ask it but then also says "Unrecognized Command"
Code:
] amx_whois ding
[WHOIS] Whois: dingUnknown command: amx_whois
] amx_whois ding 
[WHOIS] Whois: dingUnknown command: amx_whois
] amx_whoisip dong
[WHOIS] WhoisIP: dongUnknown command: amx_whoisip
]
So I am lost. Any help appreciated.

Here are the important snips:

Code:
public plugin_init() {   register_plugin(PLUGIN_NAME, VERSION, AUTHOR)   register_clcmd("amx_whois",   "amx_whois", ADMIN_CHAT, "<name or #userid> - Displays names for Authid")   register_clcmd("amx_whoisip", "amx_whois", ADMIN_CHAT, "<name or #userid> - Displays names for IP") } ....snipitty snip snip.... public amx_whois(id, level, cid) {   if(!cmd_access(id, level, cid, 2))     return PLUGIN_HANDLED       new cmd[32], arg[32]   read_argv(0, cmd, 31)     read_argv(1, arg, 31)     if(equal(cmd, "amx_whois"))     client_print(id, print_console, "[WHOIS] Whois: %s", arg)   else if(equal(cmd, "amx_whoisip"))     client_print(id, print_console, "[WHOIS] WhoisIP: %s", arg)     return PLUGIN_CONTINUE }
BigWalnutZ is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-15-2005 , 15:26  
Reply With Quote #2

Return PLUGIN_HANDLED instead of PLUGIN_CONTINUE in the functions that are saying "unknown command."
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BigWalnutZ
Junior Member
Join Date: Apr 2005
Old 04-15-2005 , 16:16  
Reply With Quote #3

PLUGIN_HANDLED == 0
PLUGIN_CONTINUE == 1

Is that what they mean? I get messed up with those.

FYI thanks that fixed it.
BigWalnutZ is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-15-2005 , 16:18  
Reply With Quote #4


http://forums.alliedmods.net/showthr...t=5345+handled
__________________
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
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-15-2005 , 16:58  
Reply With Quote #5

http://forums.alliedmods.net/showthread.php?t=10493
xeroblood is offline
Send a message via MSN to xeroblood
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-15-2005 , 17:27  
Reply With Quote #6

Quote:
Originally Posted by xeroblood

Hmm, maybe that was the one I was looking for instead. ;)
__________________
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
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 09:50.


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