SA-MP Forums Archive
PlayAudioStream: Error 35 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PlayAudioStream: Error 35 (/showthread.php?tid=353528)



PlayAudioStream: Error 35 - wessoo - 23.06.2012

Uhh I mean wtf, can someone tell me what I did wrong?

Код:
C:\Users\Wesley\Desktop\New\gamemodes\SRP.pwn(24953) : error 035: argument type mismatch (argument 2)
C:\Users\Wesley\Desktop\New\gamemodes\SRP.pwn(24969) : error 035: argument type mismatch (argument 2)
C:\Users\Wesley\Desktop\New\gamemodes\SRP.pwn(31680) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
That's the errors, (don't mind the warning).
It shows 2x Error 35: Argument Type Mismatch.
A friend of mine told me it had to do with the numbers and stuff after the URL.
So I had this:
Код HTML:
PlayAudioStreamForPlayer(playerid, URL);
And he told me to change it to this:
Код HTML:
PlayAudioStreamForPlayer(playerid, URL, 0, 0, 0, 50.0, 0);
But the thing is, after I changed it I still got the same errors..

Here's my code:

PHP код:
command(playplayeridparams[])
{
    new 
urlok;
    if(!
sscanf(params"s"urlok))
    {
        
PlayAudioStreamForPlayer(playeridurlok00050.00);
    }
}
command(aplayplayeridparams[])
{
    if(
Player[playerid][AdminLevel] >=2)
    {
        new 
url;
        if(!
sscanf(params"s"url))
        {
            for (new 
i=0MAX_PLAYERSi++)
            {
                new 
pName[MAX_PLAYER_NAME], string[128];
                
GetPlayerName(playeridpNamesizeof(pName));
                
format(stringsizeof(string), "%s has just turned on a song!"pName);
                
PlayAudioStreamForPlayer(iurl00050.00);
            }
        }
    }
    else if(
Player[playerid][AdminLevel] <=1)
    {
        
SendClientMessage(playeridWHITE"You are not an Administrator!");
    }
    else
    {
        
SendClientMessage(playeridWHITE"SYNTAX: /play [url]");
    }
    return 
1;




Re: PlayAudioStream: Error 35 - [KHK]Khalid - 23.06.2012

pawn Код:
new url[32]; // changed it to url[32] (I don't think there's a url longer than 32 c anyway you can change that)
Also the PlayAudioStreamForPlayer can be used like that unless you need it in a certain position
pawn Код:
PlayAudioStreamForPlayer(playerid, url);



Re: PlayAudioStream: Error 35 - wessoo - 23.06.2012

Thank you, itґs fixed now.