summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-03 06:24:14 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-03 06:24:14 +0000
commit36d1e4a1a190119b8b9c3686ad8c666256737037 (patch)
tree21620253260680fb156ee91097488bcb8dd999b6
parenta8bd882577d777dfa25d1ce6430ae4ee1e52b5d8 (diff)
downloadopenttd-36d1e4a1a190119b8b9c3686ad8c666256737037.tar.xz
(svn r4706) - NewGRF: add the correct default error message for the wagon attach callback.
-rw-r--r--lang/english.txt1
-rw-r--r--train_cmd.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/lang/english.txt b/lang/english.txt
index 93874896f..08e332275 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -2514,6 +2514,7 @@ STR_886F_TRANSFER :{BLACK}Transfer
STR_TRAIN_STOPPING :{RED}Stopping
STR_TRAIN_STOPPING_VEL :{RED}Stopping, {VELOCITY}
+STR_INCOMPATIBLE_RAIL_TYPES :Incompatible rail types
##id 0x9000
STR_9000_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Road vehicle in the way
diff --git a/train_cmd.c b/train_cmd.c
index 2b9df49ac..bb0bd813f 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1081,7 +1081,7 @@ int32 CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* Check NewGRF Callback 0x1D */
uint16 callback = GetVehicleCallbackParent(CBID_TRAIN_ALLOW_WAGON_ATTACH, 0, 0, dst_head->engine_type, src, dst_head);
if (callback != CALLBACK_FAILED) {
- if (callback == 0xFD) return CMD_ERROR;
+ if (callback == 0xFD) return_cmd_error(STR_INCOMPATIBLE_RAIL_TYPES);
if (callback < 0xFD) {
StringID error = GetGRFStringID(GetEngineGRFID(dst_head->engine_type), 0xD000 + callback);
return_cmd_error(error);