MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CommandCostWithParam

Function CommandCostWithParam

src/command.cpp:417–424  ·  view source on GitHub ↗

* Return an error status, with string and parameter. * @param str StringID of error. * @param value Single parameter for error. * @returns CommandCost representing the error. */

Source from the content-addressed store, hash-verified

415 * @returns CommandCost representing the error.
416 */
417CommandCost CommandCostWithParam(StringID str, uint64_t value)
418{
419 CommandCost error = CommandCost(str);
420 if (IsLocalCompany()) {
421 error.SetEncodedMessage(GetEncodedString(str, value));
422 }
423 return error;
424}

Callers 14

ClearTile_IndustryFunction · 0.70
DoBuildLockFunction · 0.70
CheckBuildAbove_WaterFunction · 0.70
CmdBuildBridgeFunction · 0.70
CmdIncreaseLoanFunction · 0.70
CmdDecreaseLoanFunction · 0.70
IsStationBridgeAboveOkFunction · 0.70
CmdBuildAirportFunction · 0.70
ClearTile_StationFunction · 0.70
ClearTile_TownFunction · 0.70

Calls 4

CommandCostClass · 0.85
IsLocalCompanyFunction · 0.85
SetEncodedMessageMethod · 0.80
GetEncodedStringFunction · 0.70

Tested by

no test coverage detected