SA-MP Forums Archive
Need help about dialog!! - 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: Need help about dialog!! (/showthread.php?tid=391005)



Need help about dialog!! - ejul - 09.11.2012

i dont know where to put the else!!
please help...

Код:
if(dialogid == 100)
        {
                if(response == 0) return SendClientMessage(playerid, COLOR_GOLD, "Admin Tele Canceled");
                    switch(listitem)
                {
                case 0:{
                ShowPlayerDialog(playerid, 101, DIALOG_STYLE_LIST,"Pilot Spawn","Los Santos\nLas Venturas\nSan Fierro", "Enter", "Cancel");
                }
                 case 1:{
                 if(GetPlayerScore(playerid) < 100)
                 {
				 SendClientMessage(playerid, COLOR_RED, "you need 100 score to be military pilot");
				 ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST,"Class Selection","Pilot\nMilitary Pilot", "Enter", "Quit");
				 }
                  ShowPlayerDialog(playerid, 102, DIALOG_STYLE_LIST,"Military Pilot Spawn","Are 69", "Enter", "Cancel");
                }

                }

              else // Pressed ESC or clicked cancel
        {
            SendClientMessage(playerid, COLOR_RED, "You have press Quit");
            Kick(playerid);
        }



        }
This error
___________
Quote:

error 029: invalid expression, assumed zero




Re: Need help about dialog!! - Mustafa6155 - 09.11.2012

where is the line u got that error and show the line i can fix

I think u need to delete
switch(listitem)
{ <----this thing??


Re: Need help about dialog!! - ejul - 09.11.2012

this
Quote:

else // Pressed ESC or clicked cancel
{
SendClientMessage(playerid, COLOR_RED, "You have press Quit");
Kick(playerid);
}

please help!!!


Re: Need help about dialog!! - Virus. - 09.11.2012

Try this
Quote:

if(response)

instead of this

Quote:

if(response == 0)

EDIT : Reply here if it worked or not, and i will try to explain what was wrong.


Re: Need help about dialog!! - Konstantinos - 09.11.2012

Код:
if(dialogid == 100)
{
    if(response) // If he presses enter
    {
        switch(listitem)
        {
            case 0: return ShowPlayerDialog(playerid, 101, DIALOG_STYLE_LIST,"Pilot Spawn","Los Santos\nLas Venturas\nSan Fierro", "Enter", "Cancel");
            case 1:
            {
                if(GetPlayerScore(playerid) < 100)
                {
                    SendClientMessage(playerid, COLOR_RED, "you need 100 score to be military pilot");
                    ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST,"Class Selection","Pilot\nMilitary Pilot", "Enter", "Quit");
                }
                ShowPlayerDialog(playerid, 102, DIALOG_STYLE_LIST,"Military Pilot Spawn","Are 69", "Enter", "Cancel");
                return 1;
            }
    	}
    }
    else return SendClientMessage(playerid, COLOR_GOLD, "Admin Tele Canceled"); // Otherwise, ESC
}