Code:
Problem description:
No code here. Since I'm at a lost for words.
I need help making it so that whenever an invalid command is typed into the command bar, I can give out a particularly string of text so that the user knows what to do.
Any help?
ID:2141886
![]() Sep 1 2016, 12:44 pm
|
|
TY for the speedy response.
However, the 'Desc setting(verb)' isn't quite what I'm looking to do. Pretty much, I'm using the basic Byond Command Bar -- where you can type something and activate a verb. What I want it to do is similar to various MUDs Ive played. Where if you put in an invalid command (which is something that's not a verb) it'll give you a message prompt like. 'that command is invalid. To see a list of valid commands type /commands' |
Assuming you're talking about the Input element, which is at the bottom of a default skin interface, above the status bar, rather than the Client>Command menu item in Options & Messages:
If the arguments given to the verb are invalid, they'll see the usage text which is provided by the "desc" setting. |
I was talking about the Input element, correct.
But hrm, I see what you mean about the desc setting. Is there a way to override it so that anything thing submitted into the input element that -isn't- a coded verb will release a specified text string to the output? Pardon if this is a bit elementary, but I'm having trouble grasping it. I manipulated the 'Command' and 'Command_text' but it didn't work out as well as planned. |
client/Command(command) // This'll be called if something invalid is entered into the input. Most MUDs don't use verbs at all, but use client/Command() to parse the 'command' argument to handle things manually, but it's not required. |
Other than that, it would help to know what an "invalid command" is. If you're using your own parser or something, you'd have to check for a valid command and produce some output when no valid command is found.