diff options
author | rubidium <rubidium@openttd.org> | 2011-12-10 16:05:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-12-10 16:05:26 +0000 |
commit | 0ca25fb3af8fbf00607df120149b27aa7a763edb (patch) | |
tree | 432cac5f9d7caac4f6256b2c4266bfcfd42a68b9 /src/saveload | |
parent | e88a982fc6b12fbecbba59868fc8530449ff0ca7 (diff) | |
download | openttd-0ca25fb3af8fbf00607df120149b27aa7a763edb.tar.xz |
(svn r23480) -Fix [FS#4594]: replace OS error messages with internal error messages when that's possible
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/saveload.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 5efc187a8..afcd9332a 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -2285,7 +2285,8 @@ static const SaveLoadFormat *GetSavegameFormat(char *s, byte *compression_level) char *end; long level = strtol(complevel, &end, 10); if (end == complevel || level != Clamp(level, slf->min_compression, slf->max_compression)) { - ShowInfoF("Compression level '%s' is not valid.", complevel); + SetDParamStr(0, complevel); + ShowErrorMessage(STR_CONFIG_ERROR, STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_LEVEL, WL_CRITICAL); } else { *compression_level = level; } @@ -2294,7 +2295,9 @@ static const SaveLoadFormat *GetSavegameFormat(char *s, byte *compression_level) } } - ShowInfoF("Savegame format '%s' is not available. Reverting to '%s'.", s, def->name); + SetDParamStr(0, s); + SetDParamStr(1, def->name); + ShowErrorMessage(STR_CONFIG_ERROR, STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_ALGORITHM, WL_CRITICAL); /* Restore the string by adding the : back */ if (complevel != NULL) *complevel = ':'; |