Hello guys,
i'm just confused and completely lost. Tried to google it, but without any luck, and can't solve this issue.
So, I get this error:
Code:
Exception reported: Stack went below stack boundary
With these Lines:
- 432 (sdktools_sound.inc::EmitSoundToClient)
- 951 (gungame.sp::gg_PlaySound)
So mine gg_PlaySound function:
PHP Code:
public void gg_PlaySound(int team, char[] sound) {
for (int client = 1; client <= MaxClients; client++) {
if (IsValidPlayer(client) && gg_IsValidTeam(team) && GetClientTeam(client) == team) {
PrintToChatAll("Team: %i Sound: %s",team, sound);
EmitSoundToClient(client,sound,SOUND_FROM_PLAYER,SNDCHAN_AUTO,SNDLEVEL_NORMAL,SND_NOFLAGS,SNDVOL_NORMAL,SNDPITCH_NORMAL,-1,NULL_VECTOR,NULL_VECTOR,true,0.0);
}
}
}
I tried EmitSoundToClient(client,sound) and with full EmitSoundToClient function parameters, nothing helps.
PrintToChatAll returns me: (int) 2 and (string) "hlx/gg_levelup.mp3", sounds are precached.
In fact, i have no idea whats wrong here and how need to solve. Maybe I missing something, but spet 2 days for now and can't figure out.
EDIT: I pass arguments to mine function like this:
Quote:
gg_PlaySound(EnemyTeam,SOUND_TAKEN_LEAD);
|
Where:
EnemyTeam is CS_TEAM_T or CS_TEAM_CT,
char SOUND_TAKEN_LEAD[] = "hlx/gg_taken_lead.mp3";