summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohannes <johannes.herman@gmail.com>2024-04-14 21:43:14 +0200
committerjohannes <johannes.herman@gmail.com>2024-04-14 21:43:14 +0200
commitacf44dc3063f0259a526594260b3f91e743c23b7 (patch)
tree89787293bae544238570c2100a9c2cb8fa9e9c2b
parent4b9c34fa745ef22304899dfaf52b6a10c24cb86c (diff)
added warning message for player not found
-rw-r--r--src/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 7b75a30..89f400c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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)