add debug warning for unknown argument keywords

"weapon asault" will now print a warning to console.
This commit is contained in:
ac-stef
2015-03-24 02:06:19 +01:00
parent 7b607a6c43
commit b4b1c0bf91
2 changed files with 11 additions and 3 deletions
+5
View File
@@ -432,6 +432,11 @@ int getlistindex(const char *key, const char *list[], bool acceptnumeric, int de
int i = (int)strtol(key, NULL, 0);
if(i >= 0 && i < max) return i;
}
#if !defined(STANDALONE) && defined(_DEBUG)
char *opts = conc(list, -1, true);
if(*key) clientlogf("warning: unknown token \"%s\" (not in list [%s])", key, opts);
delstring(opts);
#endif
return deflt;
}