mirror of https://github.com/OpenTTD/OpenTTD.git
(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:
parent
6a3a304283
commit
83f8d52a67
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue