Raised This Month: $51 Target: $400
 12% 

Passing string to function (tag mismatch)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GAVVVR
Member
Join Date: May 2010
Old 11-10-2013 , 07:18   Passing string to function (tag mismatch)
Reply With Quote #1

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 
1<= MaxClientsi++)
    {
        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]
GAVVVR is offline
xf117
Senior Member
Join Date: Mar 2010
Location: Russia
Old 11-10-2013 , 07:54   Re: Passing string to function (tag mismatch)
Reply With Quote #2

Well, your function expects the "Sting" not a "String".
xf117 is offline
Send a message via ICQ to xf117
GAVVVR
Member
Join Date: May 2010
Old 11-10-2013 , 08:25   Re: Passing string to function (tag mismatch)
Reply With Quote #3

Oh God...
Thank you xf117. You solved my problem.
"Sting:" was highlighted with sublime text 2 properly and i never tried to search for mistake here

Last edited by GAVVVR; 11-10-2013 at 08:28.
GAVVVR is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode