SA-MP Forums Archive
Code crashes my GM - 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: Code crashes my GM (/showthread.php?tid=543223)



Code crashes my GM - BizzyD - 25.10.2014

Hello, I have a issue with this code:

Код:
if(IsAtRadioTower(playerid))
	{
        if(GetPVarInt(playerid, "AtRadioTower") != 0)
        {
            SetPVarInt(playerid, "AtRadioTower", GetPVarInt(playerid, "AtRadioTower")+1);
            PlayAudioStreamForPlayer(playerid, "http://URLREMOVED/music/2.mp3");
		}
		else if(!IsAtRadioTower(playerid))
		{
		    DeletePVar(playerid,"AtRadioTower");
            StopAudioStreamForPlayer(playerid);
		}
	}
It crashes my gamemode and leaves this error in the server panel: Run time error 17: "Invalid/unsupported P-code file format"

Whats wrong with it?


Re: Code crashes my GM - Laurey - 25.10.2014

You sure you got the plugin needed for it? Audio plugin is required i guess.


Re: Code crashes my GM - BizzyD - 25.10.2014

Yeah that did it. Thanks