changeset 15466:176e340884a9 draft

(svn r20115) -Add: Show an specific error message when trying to remove nonexistant stations.
author terkhen <terkhen@openttd.org>
date Sat, 10 Jul 2010 20:17:05 +0000
parents 8c1ec9acb54c
children cfc3beb1cf80
files src/lang/english.txt src/station_cmd.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -3484,6 +3484,7 @@
 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
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1439,7 +1439,7 @@
 		}
 	}
 
-	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 @@
 		}
 	}
 
-	if (quantity == 0) return CMD_ERROR;
+	if (quantity == 0) return_cmd_error(STR_ERROR_THERE_IS_NO_STATION);
 
 	return cost;
 }