Changeset - r14818:d652bc9ae7bc
[Not reviewed]
master
0 3 0
alberth - 15 years ago 2010-03-14 14:36:37
alberth@openttd.org
(svn r19419) -Codechange: Use failed CommandCost object to retrieve message instead of _error_message.
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_object.cpp
Show inline comments
 
@@ -215,7 +215,7 @@ bool AIObject::DoCommand(TileIndex tile,
 
	/* We failed; set the error and bail out */
 
	if (res.Failed()) {
 
		res.SetGlobalErrorMessage();
 
		SetLastError(AIError::StringToError(_error_message));
 
		SetLastError(AIError::StringToError(res.GetErrorMessage()));
 
		return false;
 
	}
 

	
src/bridge_gui.cpp
Show inline comments
 
@@ -387,7 +387,7 @@ void ShowBuildBridgeWindow(TileIndex sta
 

	
 
	GUIBridgeList *bl = NULL;
 
	if (ret.Failed()) {
 
		errmsg = _error_message;
 
		errmsg = ret.GetErrorMessage();
 
	} else {
 
		/* check which bridges can be built */
 
		const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2);
src/command.cpp
Show inline comments
 
@@ -511,7 +511,7 @@ bool DoCommandP(TileIndex tile, uint32 p
 
		/* Only show the error when it's for us. */
 
		StringID error_part1 = GB(cmd, 16, 16);
 
		if (estimate_only || (IsLocalCompany() && error_part1 != 0 && my_cmd)) {
 
			ShowErrorMessage(error_part1, _error_message, WL_INFO, x, y);
 
			ShowErrorMessage(error_part1, res.GetErrorMessage(), WL_INFO, x, y);
 
		}
 
	} else if (estimate_only) {
 
		ShowEstimatedCostOrIncome(res.GetCost(), x, y);
0 comments (0 inline, 0 general)