Fixed up some error messages...
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40475
This commit is contained in:
parent
2747f06eb7
commit
dd9b575853
@ -259,7 +259,7 @@ void CConVarManager::HookConVarChange(IPluginContext *pContext, ConVar *cvar, fu
|
||||
// This shouldn't happen...
|
||||
if (func == NULL)
|
||||
{
|
||||
pContext->ThrowNativeError("Invalid function: %d", funcid);
|
||||
pContext->ThrowNativeError("Invalid function specified");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@ void CConVarManager::UnhookConVarChange(IPluginContext *pContext, ConVar *cvar,
|
||||
// This shouldn't happen...
|
||||
if (func == NULL)
|
||||
{
|
||||
pContext->ThrowNativeError("Invalid function: %d", funcid);
|
||||
pContext->ThrowNativeError("Invalid function specified");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -315,14 +315,14 @@ void CConVarManager::UnhookConVarChange(IPluginContext *pContext, ConVar *cvar,
|
||||
// If the forward doesn't exist, we can't unhook anything
|
||||
if (fwd == NULL)
|
||||
{
|
||||
pContext->ThrowNativeError("Convar \"%s\" has no active hook.", cvar->GetName());
|
||||
pContext->ThrowNativeError("Convar \"%s\" has no active hook", cvar->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove the function from the forward's list
|
||||
if (!fwd->RemoveFunction(func))
|
||||
{
|
||||
pContext->ThrowNativeError("Function %d is not a valid hook callback for convar \"%s\"", funcid, cvar->GetName());
|
||||
pContext->ThrowNativeError("Invalid hook callback specified for convar \"%s\"", cvar->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -362,4 +362,3 @@ void CConVarManager::OnConVarChanged(ConVar *cvar, const char *oldValue)
|
||||
fwd->PushString(oldValue);
|
||||
fwd->Execute(NULL);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ void CDbgReporter::OnContextExecuteError(IPluginContext *ctx, IContextTrace *err
|
||||
const char *custerr;
|
||||
if ((custerr=error->GetCustomErrorString()) != NULL)
|
||||
{
|
||||
g_Logger.LogError("[SM] Native \"%s\" reported: \"%s\"", lastname, custerr);
|
||||
g_Logger.LogError("[SM] Native \"%s\" reported: %s", lastname, custerr);
|
||||
} else {
|
||||
g_Logger.LogError("[SM] Native \"%s\" encountered a generic error.", lastname);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ static cell_t sm_CreateConVar(IPluginContext *pContext, const cell_t *params)
|
||||
// While the engine seems to accept a blank convar name, it causes a crash upon server quit
|
||||
if (name == NULL || strcmp(name, "") == 0)
|
||||
{
|
||||
return pContext->ThrowNativeError("Null or blank convar name is not allowed.");
|
||||
return pContext->ThrowNativeError("Null or blank convar name is not allowed");
|
||||
}
|
||||
|
||||
pContext->LocalToString(params[2], &defaultVal);
|
||||
|
Loading…
Reference in New Issue
Block a user