diff options
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/script_error.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/script/api/script_error.cpp b/src/script/api/script_error.cpp index d30ad9c66..87647cfe8 100644 --- a/src/script/api/script_error.cpp +++ b/src/script/api/script_error.cpp @@ -13,6 +13,7 @@ #include "script_error.hpp" #include "../../core/bitmath_func.hpp" #include "../../string_func.h" +#include "../../strings_func.h" #include "../../safeguards.h" @@ -31,8 +32,8 @@ ScriptError::ScriptErrorMapString ScriptError::error_map_string = ScriptError::S /* static */ ScriptErrorType ScriptError::StringToError(StringID internal_string_id) { - uint index = GB(internal_string_id, 11, 5); - switch (GB(internal_string_id, 11, 5)) { + uint index = GetStringIndex(internal_string_id); + switch (GetStringTab(internal_string_id)) { case 26: case 28: case 29: case 30: // NewGRF strings. return ERR_NEWGRF_SUPPLIED_ERROR; |