AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   command recognized, but not... (https://forums.alliedmods.net/showthread.php?t=12424)

BigWalnutZ 04-15-2005 15:10

command recognized, but not...
 
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 }

XxAvalanchexX 04-15-2005 15:26

Return PLUGIN_HANDLED instead of PLUGIN_CONTINUE in the functions that are saying "unknown command."

BigWalnutZ 04-15-2005 16:16

PLUGIN_HANDLED == 0
PLUGIN_CONTINUE == 1

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

FYI thanks that fixed it.

v3x 04-15-2005 16:18

:arrow:
http://forums.alliedmods.net/showthr...t=5345+handled

xeroblood 04-15-2005 16:58

:arrow: http://forums.alliedmods.net/showthread.php?t=10493 :!:

v3x 04-15-2005 17:27

Quote:

Originally Posted by xeroblood

:!: :?: :!:
Hmm, maybe that was the one I was looking for instead. ;)


All times are GMT -4. The time now is 09:50.

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