HELP - error 021: symbol already defined: "Audio_SetPosition"
#1

I get the following error when trying to compile, how do I fix it?

Quote:

C:\Users\User\Desktop\test\pawno\include\audio.inc (46) : error 021: symbol already defined: "Audio_SetPosition"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

I think this is the area where the error is coming from, it's the only places where 'Audio_SetPosition' is used in it:
Quote:

forward SendAudioToPlayer(playerid, audioid, volume, seek);
public SendAudioToPlayer(playerid, audioid, volume, seek)
{
if(IsPlayerConnected(playerid))
{
if(Audio_IsClientConnected(playerid))
{
new localhandle = Audio_Play(playerid,audioid,false,false,false);
Audio_SetVolume(playerid, localhandle, volume);
Audio_SetPosition(playerid, localhandle, seek);
}
else
{
return 1;
}
}
return 1;
}

SendAudioToRange(audioid, volume, seek, Float, Float:y, Float:z, Float:range)
{
if(audiohandleglobal >= 99)
{
audiohandleglobal = 0;
}
else
{
audiohandleglobal++;
}

foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(Audio_IsClientConnected(i))
{
if(IsPlayerInRangeOfPoint(i,range,x,y,z))
{
new localhandle = Audio_Play(i,audioid,false,false,false);
Audio_Set3DPosition(i, localhandle, x, y, z, range);
Audio_SetVolume(i, localhandle, volume);
Audio_SetPosition(i, localhandle, seek);
audiohandle[i][audiohandleglobal] = localhandle;
}
}
}
}
return audiohandleglobal;
}

stock SendAudioURLToRange(url[], volume, seek, Float, Float:y, Float:z, Float:range)
{
if(audiohandleglobal >= 99)
{
audiohandleglobal = 0;
}
else
{
audiohandleglobal++;
}
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(Audio_IsClientConnected(i))
{
if(IsPlayerInRangeOfPoint(i,range,x,y,z))
{
new localhandle = Audio_PlayStreamed(i,url,false,false,false);
Audio_Set3DPosition(i, localhandle, x, y, z, range);
Audio_SetVolume(i, localhandle, volume);
Audio_SetPosition(i, localhandle, seek);
audiohandle[i][audiohandleglobal] = localhandle;
}
}
}
}
return audiohandleglobal;
}

Reply
#2

It seems that you use two includes that have defined a same function name, please post your script's header.
Note: Use [CODE] tags for scripts, not [QUOTE].
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)