1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Add location to error messages

This commit is contained in:
Peter Froud
2024-03-16 23:36:22 -07:00
committed by Gymnasiast
parent 257c2d45d3
commit 226fc4cb00
2 changed files with 5 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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);
}