Changeset - r12177:62132efdfaf5
[Not reviewed]
master
0 1 0
frosch - 15 years ago 2009-06-19 15:48:13
frosch@openttd.org
(svn r16600) -Fix: Give a more meaningful error message when console commands expect an integer but don't get one.
1 file changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/settings.cpp
Show inline comments
 
@@ -1628,7 +1628,12 @@ void IConsoleSetSetting(const char *name
 
		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) {
0 comments (0 inline, 0 general)