SA-MP Forums Archive
audio plugin errors - 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: audio plugin errors (/showthread.php?tid=454523)



audio plugin errors - Jhony_Blaze - 29.07.2013

Hello, I keep getting these audio errors and I've tried everything but nothing seems to work, I have the latest audio plugin and include too from Incognito, I edited the plugins line on my server cfg and I added audio.dll to it.I've also downloaded and installed the latest audio client. I don't know what to do more.

Here are the errors

Код:
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(5134) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(5138) : warning 235: public function lacks forward declaration (symbol "Audio_OnSetPack")
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(13295) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(13306) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(13602) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(13671) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(15309) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(15947) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(16001) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(16727) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17196) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17556) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17567) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17578) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17586) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17599) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17610) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(17618) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\sv\gamemodes\PLA.pwn(40192) : warning 215: expression has no effect

Here are some lines, can't add them all cause there are many.
Line 40192
Код:
					GameTextForPlayer(i, "~y~PayDay~n~~w~Paycheck", 5000, 1);
					SendAudioToPlayer(i, 1184, 100, 0);
					PlayerInfo[i][pPayDay] = 0;
					PlayerInfo[i][pPayCheck] = 0;
					PlayerInfo[i][pConnectTime] += 1;
					if(PlayerInfo[i][pConnectTime] == 2) SendClientMessageEx(i, COLOR_LIGHTRED, "You may now possess/use weapons!");
					if(PlayerInfo[i][pDonateRank] > 0)
					{
17618
Код:
{
      				PlayerInfo[playerid][pPaintTeam] = 2;
	    			PaintBallArena[arenaid][pbTeamBlue]++;
		    		format(string,sizeof(string),"[Paintball Arena] %s has joined the Paintball Arena on the Blue Team!", name);
      				SendPaintballArenaMessage(arenaid,PAINTBALL_TEAM_BLUE,string);
      				SendAudioToPlayer(playerid, 40, 100, 0);
				}
17610
Код:
     {
		            SendClientMessageEx(playerid, COLOR_WHITE, "Teams are currently un-even, sending you to the Red team.");
	        		PlayerInfo[playerid][pPaintTeam] = 1;
	    			PaintBallArena[arenaid][pbTeamRed]++;
	    			format(string,sizeof(string),"[Paintball Arena] %s has joined the Paintball Arena on the Red Team!", name);
      				SendPaintballArenaMessage(arenaid,PAINTBALL_TEAM_RED,string);
      				SendAudioToPlayer(playerid, 41, 100, 0);
		        }
etc.etc. Hope you guys can check in it and help me with something, I really don't know what would be the problem, also I added on the top of the script these

Код:
#define SendAudioToPlayer
#define SendAudioToRange
#define SendAudioURLToRange
I added those cause when I first compiled it showed me that its undefined symbol SendAudioToPlayer,SendAudioToRange and SendAudioURLToRange


Re: audio plugin errors - Red_Dragon. - 29.07.2013

Add those.
pawn Код:
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_Seek(playerid, localhandle, seek);
        }
        else
        {
            return 0;
        }
    }
    return 1;
}

SendAudioToRange(audioid, volume, seek, Float:x, 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_Seek(i, localhandle, seek);
                    audiohandle[i][audiohandleglobal] = localhandle;
                }
            }
        }
    }
    return audiohandleglobal;
}

stock SendAudioURLToRange(url[], volume, seek, Float:x, 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_Seek(i, localhandle, seek);
                    audiohandle[i][audiohandleglobal] = localhandle;
                }
            }
        }
    }
    return audiohandleglobal;
}
}