[HELP]Dialog Script
#1

So im trying to make an audio player here and heres the code.
Код:
if(response)
    {
    switch(dialogid)
        {
		case 1:
    	    {
           	  switch(listitem)
        	  {
			    case 0:
			    {
			     ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Choose Your Track", "\nTrack1\nTrack2","Select","Exit");
			    }
			    case 1:
			    {
	             PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/xd6mr82eh5/blue_stahli_ultranumb.mp3");
                }

			  }
			 }
		}
		return 1;
	 }
	   


if(response)
   {
   switch(dialogid)
	 {
	 case 2:
		{
		   switch(listitem)
		   {
			case 0:
			{
			PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/9r0ej8r9l1/2pac_hit_em_up_lyrics.mp3");
			}
			case 1:
			{
			PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/xd6mr82eh5/blue_stahli_ultranumb.mp3");
			}
		 }
	  }
	}
Now i looked up some error helping and it said that i need to write return 1; to
Код:
case 1:
			{
			PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/xd6mr82eh5/blue_stahli_ultranumb.mp3");
			}
		 }
	  }
return 1;
	}
Here but before i had the error of compunding 030,and now it vanishes and error 002 appears.Only a single statement can follow each case.
Any Help is appreciated
Reply


Messages In This Thread
[HELP]Dialog Script - by eemalekorraks - 27.12.2011, 08:18
Re: [HELP]Dialog Script - by Seven_of_Nine - 27.12.2011, 08:21
Re: [HELP]Dialog Script - by eemalekorraks - 27.12.2011, 08:22
Re: [HELP]Dialog Script - by spedico - 27.12.2011, 08:26
Re: [HELP]Dialog Script - by eemalekorraks - 27.12.2011, 08:30

Forum Jump:


Users browsing this thread: 1 Guest(s)