PDA

View Full Version : Undefined symbol error


Gecko75
21/05/2013, 03:34 AM
CMD:song(playerid, params[])
{
new songtext[128], song;
if(PlayerInfo[playerid][pAdmin] > 1337) return SCM(playerid, COLOR_GREY, "unauthorized");
if(sscanf(params,"s", song)) return SCM(playerid, COLOR_GREY, "Usage: /song [songs 1-15]");
{
if(sscanf(params,"1", song)) return PlayAudioStreamForPlayer(playerid, "http://www.tunescoop.com/play/313930393432/project-x-movie-music-heads-will-roll-a-trak-remix-yeah-yeah-yeahs-mp3");
}
return 1;
}

This is my /song command, but the PlayAudioStreamForPlayer is undefined.. not sure how to include it/define it.

C:\Users\Scoot\Desktop\Roleplay\gamemodes\rp.pwn(3 743) : error 017: undefined symbol "PlayAudioStreamForPlayer"

Krakuski
21/05/2013, 03:51 AM
Get the streamer plugin: http://forum.sa-mp.com/showthread.php?t=102865

Then add "#include <streamer>" under your "#include <a_samp>" line

It should fix your problem.

Gecko75
21/05/2013, 03:56 AM
Still giving the error.

Krakuski
21/05/2013, 03:57 AM
Add this to the top of your script:


#pragma tabsize 0
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);

Gecko75
21/05/2013, 04:21 AM
Works, thanks! :D

Pottus
21/05/2013, 04:52 AM
Add this to the top of your script:


#pragma tabsize 0
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);


Don't use #pragma tabsize 0 that will fuck up all your indentation checking Krakuski that is a terrible practice.