summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
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);