diff options
| author | johannes <johannes.herman@gmail.com> | 2024-04-14 21:43:14 +0200 |
|---|---|---|
| committer | johannes <johannes.herman@gmail.com> | 2024-04-14 21:43:14 +0200 |
| commit | acf44dc3063f0259a526594260b3f91e743c23b7 (patch) | |
| tree | 89787293bae544238570c2100a9c2cb8fa9e9c2b /src | |
| parent | 4b9c34fa745ef22304899dfaf52b6a10c24cb86c (diff) | |
added warning message for player not found
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -89,6 +89,7 @@ void runrename(arg *renamearg) { int intid; int ret; + if (sscanf(renamearg->opts[0], "%d", &intid) == 1) ret = setnamebyid(intid, renamearg->opts[1], &DEMO); else @@ -99,6 +100,11 @@ void runrename(arg *renamearg) printf("Error: failed to rename player '%s', reason: name too long\n", renamearg->opts[0]); exit(EXIT_FAILURE); } + + if (ret == 0) + { + printf("Info: found no player with id of '%s'", renamearg->opts[0]); + } } void runsetskin(arg *skinarg) @@ -115,6 +121,11 @@ void runsetskin(arg *skinarg) printf("Error: failed to set skin of player '%s', reason: skin name too long\n", skinarg->opts[0]); exit(EXIT_FAILURE); } + + if (ret == 0) + { + printf("Info: found no player with id of '%s'", skinarg->opts[0]); + } } void runextractmap(arg *extarg) |
