Undefined symbol error
#1

Код:
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"
Reply
#2

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

Still giving the error.
Reply
#4

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

Works, thanks!
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)