Undefined symbol error - 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: Undefined symbol error (
/showthread.php?tid=438593)
Undefined symbol error -
Gecko75 - 21.05.2013
Код:
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(3743) : error 017: undefined symbol "PlayAudioStreamForPlayer"
Re: Undefined symbol error -
Krakuski - 21.05.2013
Get the streamer plugin:
https://sampforum.blast.hk/showthread.php?tid=102865
Then add "#include <streamer>" under your "#include <a_samp>" line
It should fix your problem.
Re: Undefined symbol error -
Gecko75 - 21.05.2013
Still giving the error.
Re: Undefined symbol error -
Krakuski - 21.05.2013
Add this to the top of your script:
pawn Код:
#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);
Re: Undefined symbol error -
Gecko75 - 21.05.2013
Works, thanks!
Re: Undefined symbol error -
Pottus - 21.05.2013
Quote:
Originally Posted by Krakuski
Add this to the top of your script:
pawn Код:
#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.