summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-07-10 20:17:05 +0000
committerterkhen <terkhen@openttd.org>2010-07-10 20:17:05 +0000
commitbb247132182238960ea0a7b1c26c43fd30c42fe7 (patch)
treeb06164f7edd9920032f55a8df701b9f17594bbb0 /src
parent191389fa8d78b17a8133112649165284aa418c0e (diff)
downloadopenttd-bb247132182238960ea0a7b1c26c43fd30c42fe7.tar.xz
(svn r20115) -Add: Show an specific error message when trying to remove nonexistant stations.
Diffstat (limited to 'src')
-rw-r--r--src/lang/english.txt1
-rw-r--r--src/station_cmd.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 60e294312..58dc611ad 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -3484,6 +3484,7 @@ STR_ERROR_CAN_T_REMOVE_TRUCK_STATION :{WHITE}Can't re
STR_ERROR_CAN_T_REMOVE_PASSENGER_TRAM_STATION :{WHITE}Can't remove passenger tram station...
STR_ERROR_CAN_T_REMOVE_CARGO_TRAM_STATION :{WHITE}Can't remove freight tram station...
STR_ERROR_MUST_REMOVE_ROAD_STOP_FIRST :{WHITE}Must remove road stop first
+STR_ERROR_THERE_IS_NO_STATION :{WHITE}...there is no station here
STR_ERROR_MUST_DEMOLISH_RAILROAD :{WHITE}Must demolish railway station first
STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST :{WHITE}Must demolish bus station first
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index f35991808..5e0d478ea 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1439,7 +1439,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
}
}
- if (quantity == 0) return CMD_ERROR;
+ if (quantity == 0) return_cmd_error(STR_ERROR_THERE_IS_NO_STATION);
for (T **stp = affected_stations.Begin(); stp != affected_stations.End(); stp++) {
T *st = *stp;
@@ -1960,7 +1960,7 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
}
}
- if (quantity == 0) return CMD_ERROR;
+ if (quantity == 0) return_cmd_error(STR_ERROR_THERE_IS_NO_STATION);
return cost;
}