Improve error message for EmitSound (#787)

Improve some error messages in sdktools.
This commit is contained in:
Michael Flaherty
2018-03-20 19:42:43 -06:00
committed by Fyren
parent 08fe840bfd
commit 118d6dc9b1
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -462,7 +462,7 @@ static cell_t smn_TESend(IPluginContext *pContext, const cell_t *params)
{
return pContext->ThrowNativeError("Client index %d is invalid", client);
} else if (!pPlayer->IsInGame()) {
return pContext->ThrowNativeError("Client %d is not connected", client);
return pContext->ThrowNativeError("Client %d is not in game", client);
}
}
+5 -5
View File
@@ -390,7 +390,7 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann
{
pFunc->GetParentContext()->BlamePluginError(pFunc, "Callback-provided client index %d is invalid", client);
} else if (!pPlayer->IsInGame()) {
pFunc->GetParentContext()->BlamePluginError(pFunc, "Client %d is not connected", client);
pFunc->GetParentContext()->BlamePluginError(pFunc, "Client %d is not in game", client);
} else {
continue;
}
@@ -528,7 +528,7 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan
{
pFunc->GetParentContext()->BlamePluginError(pFunc, "Client index %d is invalid", client);
} else if (!pPlayer->IsInGame()) {
pFunc->GetParentContext()->BlamePluginError(pFunc, "Client %d is not connected", client);
pFunc->GetParentContext()->BlamePluginError(pFunc, "Client %d is not in game", client);
} else {
continue;
}
@@ -780,7 +780,7 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
{
return pContext->ThrowNativeError("Client index %d is invalid", client);
} else if (!pPlayer->IsInGame()) {
return pContext->ThrowNativeError("Client %d is not connected", client);
return pContext->ThrowNativeError("Client %d is not in game", client);
}
}
@@ -1136,7 +1136,7 @@ static cell_t EmitSoundEntry(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Client index %d is invalid", client);
}
else if (!pPlayer->IsInGame()) {
return pContext->ThrowNativeError("Client %d is not connected", client);
return pContext->ThrowNativeError("Client %d is not in game", client);
}
}
@@ -1273,7 +1273,7 @@ static cell_t EmitSentence(IPluginContext *pContext, const cell_t *params)
{
return pContext->ThrowNativeError("Client index %d is invalid", client);
} else if (!pPlayer->IsInGame()) {
return pContext->ThrowNativeError("Client %d is not connected", client);
return pContext->ThrowNativeError("Client %d is not in game", client);
}
}