summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index b5ca877f1..045da52a4 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -927,7 +927,7 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1,
} else {
/* allocate and initialize new station */
st = new Station(tile_org);
- if (st == NULL) return CMD_ERROR;
+ if (st == NULL) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
/* ensure that in case of error (or no DC_EXEC) the station gets deleted upon return */
st_auto_delete = st;
@@ -1358,7 +1358,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
} else {
/* allocate and initialize new station */
st = new Station(tile);
- if (st == NULL) return CMD_ERROR;
+ if (st == NULL) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
/* ensure that in case of error (or no DC_EXEC) the new station gets deleted upon return */
st_auto_delete = st;
@@ -1652,7 +1652,7 @@ CommandCost CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* allocate and initialize new station */
st = new Station(tile);
- if (st == NULL) return CMD_ERROR;
+ if (st == NULL) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
/* ensure that in case of error (or no DC_EXEC) the station gets deleted upon return */
st_auto_delete = st;
@@ -1774,7 +1774,7 @@ CommandCost CmdBuildBuoy(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* allocate and initialize new station */
Station *st = new Station(tile);
- if (st == NULL) return CMD_ERROR;
+ if (st == NULL) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
/* ensure that in case of error (or no DC_EXEC) the station gets deleted upon return */
AutoPtrT<Station> st_auto_delete(st);
@@ -1939,7 +1939,7 @@ CommandCost CmdBuildDock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
} else {
/* allocate and initialize new station */
st = new Station(tile);
- if (st == NULL) return CMD_ERROR;
+ if (st == NULL) return_cmd_error(STR_3008_TOO_MANY_STATIONS_LOADING);
/* ensure that in case of error (or no DC_EXEC) the station gets deleted upon return */
st_auto_delete = st;