From 226fc4cb008b84d4e4dee3e9e74301dc5287217a Mon Sep 17 00:00:00 2001 From: Peter Froud Date: Sat, 16 Mar 2024 23:36:22 -0700 Subject: [PATCH] Add location to error messages --- src/openrct2/actions/FootpathAdditionPlaceAction.cpp | 4 ++-- src/openrct2/actions/FootpathAdditionRemoveAction.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp index e4d78a015a..09038e1b1b 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp @@ -77,7 +77,7 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const auto tileElement = MapGetFootpathElement(_loc); if (tileElement == nullptr) { - LOG_ERROR("Could not find path element."); + LOG_ERROR("Could not find path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } @@ -153,7 +153,7 @@ GameActions::Result FootpathAdditionPlaceAction::Execute() const if (pathElement == nullptr) { - LOG_ERROR("Could not find path element."); + LOG_ERROR("Could not find path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } diff --git a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp index 435bdd453e..92af2ad446 100644 --- a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp +++ b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp @@ -69,14 +69,14 @@ GameActions::Result FootpathAdditionRemoveAction::Query() const auto tileElement = MapGetFootpathElement(_loc); if (tileElement == nullptr) { - LOG_ERROR("Could not find path element."); + LOG_ERROR("Could not find path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } auto pathElement = tileElement->AsPath(); if (pathElement == nullptr) { - LOG_ERROR("Could not find path element."); + LOG_ERROR("Could not find path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } @@ -101,7 +101,7 @@ GameActions::Result FootpathAdditionRemoveAction::Execute() const if (pathElement == nullptr) { - LOG_ERROR("Could not find path element."); + LOG_ERROR("Could not find path element at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); }