Improve error message for EmitSound (#787)
Improve some error messages in sdktools.
This commit is contained in:
parent
08fe840bfd
commit
118d6dc9b1
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user