The online racing simulator
incorrect command
How can I recognise when a command is typed that does not exist?
Depends on how you implemented interpreting of known commands. Usualy, this is done with switch case, or if/elseif statemets. So you would first take care of all known commands, then put at the very end "else" and do there what ever you want to do when the command is not recognized.
Thanks for your comment. I have encountered the notification made with IF you said before, but I don't use IF. I use SWITCH Case so I don't know how to do it.

For example;
CASE ‘!test’:
##code
BREAK;
Try if there is a "default" case, in c++ this is used for such purpose when no other case is satisfied. I'm not exactly sure about sintax in lapper or if it even exists, you can try google it.
help pls
** Best answer **
The syntax should be something like this.


#Verify each first word/command that starts with a "!".

SWITCH($command)

CASE "!command":
#your code
BREAK

DEFAULT:
#privmsg("Command does not exist");
BREAK;
ENDSWITCH

Thank you

FGED GREDG RDFGDR GSFDG