(svn r19419) -Codechange: Use failed CommandCost object to retrieve message instead of _error_message.

This commit is contained in:
alberth
2010-03-14 14:36:37 +00:00
parent 51e71c8a36
commit efddc16fc3
3 changed files with 3 additions and 3 deletions

View File

@@ -215,7 +215,7 @@ bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const c
/* 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;
}