29.06.2012, 18:36
I'm helping a friend to script, but this dialog thing is kind of weird, I'm not used to it.
Code:
So, how can I put these lines of code into there?
Because when I copy the lines after the 'cases', then I get error:
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;
}
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"