Index: src/script/api/script_text.cpp =================================================================== --- src/script/api/script_text.cpp (revision 27096) +++ src/script/api/script_text.cpp (working copy) @@ -201,7 +201,7 @@ p = this->paramt[i]->_GetEncodedText(p, lastofp, param_count); continue; } - p += seprintf(p, lastofp,":%X", (uint32)this->parami[i]); + p += seprintf(p, lastofp,":" OTTD_PRINTFHEX64, this->parami[i]); param_count++; } Index: src/script/api/script_text.hpp =================================================================== --- src/script/api/script_text.hpp (revision 27096) +++ src/script/api/script_text.hpp (working copy) @@ -129,7 +129,7 @@ private: StringID string; char *params[SCRIPT_TEXT_MAX_PARAMETERS]; - int parami[SCRIPT_TEXT_MAX_PARAMETERS]; + int64 parami[SCRIPT_TEXT_MAX_PARAMETERS]; ScriptText *paramt[SCRIPT_TEXT_MAX_PARAMETERS]; int paramc; Index: src/stdafx.h =================================================================== --- src/stdafx.h (revision 27096) +++ src/stdafx.h (working copy) @@ -322,10 +322,12 @@ #define OTTD_PRINTF64 "%I64d" #define OTTD_PRINTFHEX64 "%I64x" #define PRINTF_SIZE "%Iu" + #define ottd_strtoull _strtoui64 #else #define OTTD_PRINTF64 "%lld" #define OTTD_PRINTFHEX64 "%llx" #define PRINTF_SIZE "%zu" + #define ottd_strtoull strtoull #endif typedef unsigned char byte; Index: src/strings.cpp =================================================================== --- src/strings.cpp (revision 27096) +++ src/strings.cpp (working copy) @@ -874,7 +874,7 @@ bool lookup = (l == SCC_ENCODED); if (lookup) s += len; - param = (int32)strtoul(s, &p, 16); + param = ottd_strtoull(s, &p, 16); if (lookup) { if (param >= TAB_SIZE) {