summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 5d710d640..f40bf4927 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2073,8 +2073,7 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
int h = as->size_y;
if (w > _settings_game.station.station_spread || h > _settings_game.station.station_spread) {
- _error_message = STR_ERROR_STATION_TOO_SPREAD_OUT;
- return CMD_ERROR;
+ return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT);
}
CommandCost cost = CheckFlatLand(TileArea(tile, w, h), flags);