diff options
Diffstat (limited to 'pcoin.cpp')
-rw-r--r-- | pcoin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pcoin.cpp b/pcoin.cpp index 5bf1b79..b6f2f8f 100644 --- a/pcoin.cpp +++ b/pcoin.cpp @@ -55,6 +55,7 @@ #define ERR_MAIN_SEND_TOO_FEW_ARGS 6 #define ERR_MAIN_SEND_TOO_MANY_ARGS 7 +#define ERR_MAIN_SEND_TOO_MANY_ARGS_MSG 104 #define ERR_SILENTSEND 2 #define ERR_MAIN_MSG_TOO_LONG 19 #define ERR_UNKNOWN_ARG 3 @@ -1942,8 +1943,9 @@ int main(int argc, char *argv[]) } else { - //too many command-line arguments were passed (6 args) - goto LABEL_TOO_MANY_ARGS; + //too many command-line arguments were passed (6 args) (probably a message was intended) + std::cout << "\nSorry, too many command-line arguments were passed. The correct format is `tcoin send <username> <amount> \"<message>\"`.\n\n"; + return ERR_MAIN_SEND_TOO_MANY_ARGS_MSG; } } else if(argc < 4) @@ -1953,7 +1955,6 @@ int main(int argc, char *argv[]) } else if(argc > 4) { - LABEL_TOO_MANY_ARGS: std::cout << "\nSorry, too many command-line arguments were passed. The correct format is `" << PCOIN_BIN_PATH_W_SPACE << "send <username> <amount>`.\n\n"; return ERR_MAIN_SEND_TOO_MANY_ARGS; } |