* Return an error status, with string and parameter. * @param str StringID of error. * @param value Single parameter for error. * @returns CommandCost representing the error. */
| 415 | * @returns CommandCost representing the error. |
| 416 | */ |
| 417 | CommandCost 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 | } |
no test coverage detected