Problem with 'PlayAudioStreamForPlayer'
#1

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"
Reply
#2

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);
Reply
#3

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'
Reply
#4

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
Reply
#5

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?
Reply
#6

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
Reply
#7

Thanks for the help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)