Hello. I try to write the function, which plays the dafault .wav gamesound to all players connected to the server.
That's how it looks like:
PHP Code:
CPlaySoundAll(Sting:snd[])
{
for (new i = 1; i <= MaxClients; i++)
{
if(!IsClientInGame(i))
{
continue;
}
ClientCommand(i, "playgamesound \"%s\"", snd);
}
}
But when i try to call it, i got a warning on compiling:
PHP Code:
new String:snd_blip[]="buttons/blip1.wav";
CPlaySoundAll(snd_blip);
Code:
warning 213: tag mismatch
I found the similar function passing String to it in defalut basechat.sp. The function looks very similar to mine but compiling basechat.sp don't cause any warnings and i wonder what i am doing wrong.
btw my function works and makes sound in-game for all clients, but i really want to get rid of this annoying warning. Plese help me.
[The complete sourcecode link]