Dialog cases.
#1

I'm helping a friend to script, but this dialog thing is kind of weird, I'm not used to it.
Code:

pawn Код:
// This callback gets called when a player interacts with a dialog
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    // Select the proper dialog to process
    switch (dialogid)
    {
        case DialogRegister: Dialog_Register(playerid, response, inputtext); // The "Register"-dialog
        case DialogLogin: Dialog_Login(playerid, response, inputtext); // The "Login"-dialog
        }
        return 1;
}
So, how can I put these lines of code into there?

pawn Код:
if(dialogid == D_VARAV)
{
    // Do something
}

Because when I copy the lines after the 'cases', then I get error:
pawn Код:
only a single statement (or expression) can follow each "case"
Reply


Messages In This Thread
Dialog cases. - by Dan. - 29.06.2012, 18:36
Re: Dialog cases. - by Cxnnor - 29.06.2012, 18:42
Re: Dialog cases. - by newbienoob - 29.06.2012, 18:43
Re: Dialog cases. - by Cxnnor - 29.06.2012, 18:49
Re: Dialog cases. - by Dan. - 29.06.2012, 18:59
Re: Dialog cases. - by [KHK]Khalid - 29.06.2012, 19:24

Forum Jump:


Users browsing this thread: 1 Guest(s)