| 439 | } |
| 440 | |
| 441 | static cell_t sm_GetConVarString(IPluginContext *pContext, const cell_t *params) |
| 442 | { |
| 443 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 444 | HandleError err; |
| 445 | ConVar *pConVar; |
| 446 | |
| 447 | if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar)) |
| 448 | != HandleError_None) |
| 449 | { |
| 450 | return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err); |
| 451 | } |
| 452 | |
| 453 | pContext->StringToLocalUTF8(params[2], params[3], pConVar->GetString(), NULL); |
| 454 | |
| 455 | return 1; |
| 456 | } |
| 457 | |
| 458 | static cell_t sm_SetConVarString(IPluginContext *pContext, const cell_t *params) |
| 459 | { |
nothing calls this directly
no test coverage detected