mirror of https://github.com/OpenTTD/OpenTTD
(svn r26007) -Change: make handling strings coming from game scripts slightly more lenient, i.e. less 'fatal error... must quit'
parent
d7af679fd6
commit
a25ecfd982
|
@ -233,7 +233,10 @@ char *GetStringWithArgs(char *buffr, StringID string, StringParameters *args, co
|
||||||
|
|
||||||
case 15:
|
case 15:
|
||||||
/* Old table for custom names. This is no longer used */
|
/* Old table for custom names. This is no longer used */
|
||||||
error("Incorrect conversion of custom name string.");
|
if (!game_script) {
|
||||||
|
error("Incorrect conversion of custom name string.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case GAME_TEXT_TAB:
|
case GAME_TEXT_TAB:
|
||||||
return FormatString(buffr, GetGameStringPtr(index), args, last, case_index, true);
|
return FormatString(buffr, GetGameStringPtr(index), args, last, case_index, true);
|
||||||
|
@ -254,9 +257,6 @@ char *GetStringWithArgs(char *buffr, StringID string, StringParameters *args, co
|
||||||
|
|
||||||
case 30:
|
case 30:
|
||||||
return FormatString(buffr, GetGRFStringPtr(index + 0x1000), args, last, case_index);
|
return FormatString(buffr, GetGRFStringPtr(index + 0x1000), args, last, case_index);
|
||||||
|
|
||||||
case 31:
|
|
||||||
NOT_REACHED();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= _langtab_num[tab]) {
|
if (index >= _langtab_num[tab]) {
|
||||||
|
|
Loading…
Reference in New Issue