1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 02:35:46 +01:00

Add LOG_ERROR calls

This commit is contained in:
Peter Froud
2024-03-17 00:19:56 -07:00
committed by Gymnasiast
parent d1f740c786
commit 1f698dfc76
19 changed files with 64 additions and 11 deletions

View File

@@ -72,6 +72,7 @@ GameActions::Result CheatSetAction::Query() const
{
if (static_cast<uint32_t>(_cheatType) >= static_cast<uint32_t>(CheatType::Count))
{
LOG_ERROR("Invalid cheat type %u", _cheatType);
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
}
@@ -80,11 +81,17 @@ GameActions::Result CheatSetAction::Query() const
if (_param1 < validRange.first.first || _param1 > validRange.first.second)
{
LOG_ERROR(
"The first cheat parameter is out of range. Value = %d, min = %d, max = %d", _param1, validRange.first.first,
validRange.first.second);
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
}
if (_param2 < validRange.second.first || _param2 > validRange.second.second)
{
LOG_ERROR(
"The second cheat parameter is out of range. Value = %d, min = %d, max = %d", _param2, validRange.second.first,
validRange.second.second);
return GameActions::Result(
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
}