cigarettes system!
#1

hey guys im making my own idea named "addicting ciggy system" utineed some help :S im new in scripting :S look... i scripted it by using dialogs system(iused 2 dialogs so this one is the second dialog in the script) :
script:
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/ciggies", true))
	{
	    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Buy ciggies", "Esse Black(10$)\nG1(10$)\nMacbeth(5$)\nMalboro(20$)\nWinston Light(50$)\nNicotine Stick(200000$)(it stops addicting to cigarettes)", "Buy", "Cancel");
		return 1;
	}

	return CreateBox(playerid, "Error", "The command you entered is ~r~unknown ~w~! ~n~use /cmds to view the server commands.");
}
and: (this one includes the 1st dialog too)
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(response)
		{
 			case 1:
			{
   				switch(listitem)
			    {
			        case 0:
			        {
     		    		PlayAudioStreamForPlayer(playerid,"http://listen.di.fm/public5/trance.asx",0.0, 0.0, 0.0, 50.0, 0);
	    				CreateBox(playerid, "Radio", "~r~Trance music ~w~radio activated!");
					}
					case 1:
					{
    					PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public5/harddance.asx", 0.0, 0.0, 0.0, 50.0, 0);
						CreateBox(playerid, "Radio", "~r~hard dance music ~w~radio activated!");
					}
					case 2:
					{
 	 					PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public5/dubstep.asx", 0.0, 0.0, 0.0, 50.0, 0);
						CreateBox(playerid, "Radio", "~r~Dubstep music ~w~radio activated!");
					}
					case 3:
					{
    					PlayAudioStreamForPlayer(playerid, "http://listen.di.fm/public5/djmixes.asx", 0.0, 0.0, 0.0, 50.0, 0);
	    				CreateBox(playerid, "Radio", "~r~DJ mixes music ~w~radio activated!");
					}
					case 4:
					{
	    				StopAudioStreamForPlayer(playerid);
		    			CreateBox(playerid, "Radio", "~r~Radio ~w~have been stopped!");
					}
				}
				case 2:
				{
				    case 1:
				    {
				        if(GetPlayerMoney(playerid) < 10) return ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Error", "You dont have enough money to buy Esse Black cigarette!", "Okay", "Close");
				        GivePlayerMoney(playerid, -10);
				        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
					}
					case 2:
					{
					    if(GetPlayerMoney(playerid) < 10) return ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Error", "You dont have enough money to buy G1 cigarette!", "Okay", "Close");
					    GivePlayerMoney(playerid, -10);
					    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
					}
					case 3:
					{
						if(GetPlayerMoney(playerid) < 5) return ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Error", "You dont have enough money to buy Macbeth cigarette!", "Okay", "Close");
						GivePlayerMoney(playerid, -5);
						SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
					}
					case 4:
					{
						if(GetPlayerMoney(playerid) < 20) return ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Error", "You dont have enough money to buy Malboro cigarette!", "Okay", "Close");
						GivePlayerMoney(playerid, -20);
						SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
					}
					case 5:
					{
					    if(GetPlayerMoney(playerid) < 50) return ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Error", "You dont have enough money to buy Winstone Light cigarette!", "Okay", "Close");
						GivePlayerMoney(playerid, -50);
						SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
					}
					case 6:
					{
					    if(GetPlayerMoney(playerid) < 200000) return ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Error", "You dont have enough money to buy Nicotine Sticks!", "Okay", "Close");
					    GivePlayerMoney(playerid, -200000);
					    SetPlayerDrunkLevel(playerid, 0);
					}
			}
			}
		}
	return 1;
}
the error is:
Code:
C:\Users\XTC\Desktop\XTC 3.e\gamemodes\XTC.pwn(1450) : error 014: invalid statement; not in switch
C:\Users\XTC\Desktop\XTC 3.e\gamemodes\XTC.pwn(1450) : warning 215: expression has no effect
C:\Users\XTC\Desktop\XTC 3.e\gamemodes\XTC.pwn(1450) : error 001: expected token: ";", but found ":"
C:\Users\XTC\Desktop\XTC 3.e\gamemodes\XTC.pwn(1450) : error 029: invalid expression, assumed zero
C:\Users\XTC\Desktop\XTC 3.e\gamemodes\XTC.pwn(1450) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
how tofix it? please help me guys
Reply


Messages In This Thread
cigarettes system! - by «XTC» - 25.06.2012, 20:18
Re: cigarettes system! - by Kindred - 25.06.2012, 20:27
Re: cigarettes system! - by Face9000 - 25.06.2012, 20:28
Re: cigarettes system! - by «XTC» - 25.06.2012, 20:32
Re: cigarettes system! - by Face9000 - 25.06.2012, 20:34
Re: cigarettes system! - by Kindred - 25.06.2012, 20:35
Re: cigarettes system! - by «XTC» - 25.06.2012, 20:41
Re: cigarettes system! - by «XTC» - 25.06.2012, 20:54
Re: cigarettes system! - by SuperViper - 25.06.2012, 21:28
Re: cigarettes system! - by «XTC» - 25.06.2012, 21:34
Re: cigarettes system! - by «XTC» - 25.06.2012, 22:01
Re: cigarettes system! - by Kindred - 25.06.2012, 22:13
Re: cigarettes system! - by «XTC» - 25.06.2012, 22:27
Re: cigarettes system! - by «XTC» - 25.06.2012, 22:34
Re: cigarettes system! - by Steven82 - 26.06.2012, 04:21
Re: cigarettes system! - by «XTC» - 26.06.2012, 06:47

Forum Jump:


Users browsing this thread: 1 Guest(s)