(svn r16600) -Fix: Give a more meaningful error message when console commands expect an integer but don't get one.

This commit is contained in:
frosch 2009-06-19 15:48:13 +00:00
parent 6a3a304283
commit 83f8d52a67
1 changed files with 6 additions and 1 deletions

View File

@ -1628,7 +1628,12 @@ void IConsoleSetSetting(const char *name, const char *value)
uint32 val;
extern bool GetArgumentInteger(uint32 *value, const char *arg);
success = GetArgumentInteger(&val, value);
if (success) success = SetSettingValue(index, val);
if (!success) {
IConsolePrintF(CC_ERROR, "'%s' is not an integer.", value);
return;
}
success = SetSettingValue(index, val);
}
if (!success) {