add debug warning for unknown argument keywords
"weapon asault" will now print a warning to console.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user