Command usage tip?
Closed this issue · 4 comments
Deleted user commented
Is there any workaround to add an suggestion how to use a command?
lets say we have command "rate". how to output the tip like: "usage rate 25000"
instead of the default error "'rate' requires exactly 1 argument? thanks.
stillwwater commented
Would printing a Hint message after the error message be useful?
[RegisterCommand(MinArgCount = 1, MaxArgCount = 1, Hint = "rate 25000")]
static void CommandRate(CommandArg[] args) { }
The error printed would then be:
Error: 'rate' requires exactly 1 argument
Usage: rate 25000
Deleted user commented
Yes, it would be useful for sure. Since a user does not know the proper usage of the command. With the "Error: 'rate' requires exactly 1 argument" it is unclear what is the parameter has to be?
With a hint it would be understandable how to use the command. Thank you.
stillwwater commented
Added in 08a66da. Thanks for the suggestion!
Deleted user commented
Thank you for the implementation!