Problem with 'PlayAudioStreamForPlayer' -
Mr.1337 - 17.06.2012
Yesterday, I've read many tutorials regarding 'PlayAudioStreamForPlayer' as I tried to make my own command, at compiling I got no errors, only warnings. as I went in-game and typed the command so the music will start, but well. Music didn't start, and nothing happend. Here's the code. (I'm using ZCMD)
pawn Код:
CMD:station1(playerid, params[])
{
new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://50.117.115.210/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
Those are the warnings I get regarding 'Distance'.
pawn Код:
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
warning 217: loose indentation
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Distance"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
24 Warnings.
Also, when I remove
pawn Код:
#define PlayAudioStreamForPlayer
from the top of the script, I got an error:
pawn Код:
undefined symbol "PlayAudioStreamForPlayer"
Re: Problem with 'PlayAudioStreamForPlayer' -
tiernantheman - 17.06.2012
Quote:
Originally Posted by Mr.1337
Yesterday, I've read many tutorials regarding 'PlayAudioStreamForPlayer' as I tried to make my own command, at compiling I got no errors, only warnings. as I went in-game and typed the command so the music will start, but well. Music didn't start, and nothing happend. Here's the code. (I'm using ZCMD)
pawn Код:
CMD:station1(playerid, params[]) {
new Float:X, Float:Y, Float:Z, Float:Distance = 5.0; GetPlayerPos(playerid, X, Y, Z); PlayAudioStreamForPlayer(playerid, "http://50.117.115.210/listen.pls"); SendClientMessageEx(playerid, COLOR_WHITE, "Music started!"); return 1; }
Those are the warnings I get regarding 'Distance'.
pawn Код:
warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" warning 217: loose indentation warning 215: expression has no effect warning 204: symbol is assigned a value that is never used: "Distance" Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
24 Warnings.
Also, when I remove
pawn Код:
#define PlayAudioStreamForPlayer
from the top of the script, I got an error:
pawn Код:
undefined symbol "PlayAudioStreamForPlayer"
|
Try this
pawn Код:
PlayAudioStreamForPlayer(playerid, "http://50.117.115.210/listen.pls", X, Y, Z, Distance, 1);
Re: Problem with 'PlayAudioStreamForPlayer' -
Mr.1337 - 17.06.2012
Quote:
Originally Posted by tiernantheman
Try this
pawn Код:
PlayAudioStreamForPlayer(playerid, "http://50.117.115.210/listen.pls", X, Y, Z, Distance, 1);
|
I get no errors, as the radio doesn't play ingame (No music)
Also, when I remove #define PlayAudioStreamForPlayer I get errors 'undefined symbol'
Re: Problem with 'PlayAudioStreamForPlayer' -
tiernantheman - 17.06.2012
Quote:
Originally Posted by Mr.1337
I get no errors, as the radio doesn't play ingame (No music)
Also, when I remove #define PlayAudioStreamForPlayer I get errors 'undefined symbol'
|
If you get undefined symbol if you remove it then, you need to update your sa-mp server to the latest 0.3e includes
Re: Problem with 'PlayAudioStreamForPlayer' -
Mr.1337 - 17.06.2012
Quote:
Originally Posted by tiernantheman
If you get undefined symbol if you remove it then, you need to update your sa-mp server to the latest 0.3e includes
|
Where can I find them?
Re: Problem with 'PlayAudioStreamForPlayer' -
tiernantheman - 17.06.2012
Quote:
Originally Posted by Mr.1337
Where can I find them?
|
Download the windows 0.3e server if your using windows and the linux one if you have linux.
http://sa-mp.com/download.php
Re: Problem with 'PlayAudioStreamForPlayer' -
Mr.1337 - 17.06.2012
Thanks for the help.