23.06.2012, 17:25
Uhh I mean wtf, can someone tell me what I did wrong?
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:
And he told me to change it to this:
But the thing is, after I changed it I still got the same errors..
Here's my code:
Код:
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.
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);
Код HTML:
PlayAudioStreamForPlayer(playerid, URL, 0, 0, 0, 50.0, 0);
Here's my code:
PHP код:
command(play, playerid, params[])
{
new urlok;
if(!sscanf(params, "s", urlok))
{
PlayAudioStreamForPlayer(playerid, urlok, 0, 0, 0, 50.0, 0);
}
}
command(aplay, playerid, params[])
{
if(Player[playerid][AdminLevel] >=2)
{
new url;
if(!sscanf(params, "s", url))
{
for (new i=0; i < MAX_PLAYERS; i++)
{
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has just turned on a song!", pName);
PlayAudioStreamForPlayer(i, url, 0, 0, 0, 50.0, 0);
}
}
}
else if(Player[playerid][AdminLevel] <=1)
{
SendClientMessage(playerid, WHITE, "You are not an Administrator!");
}
else
{
SendClientMessage(playerid, WHITE, "SYNTAX: /play [url]");
}
return 1;
}