Dialog Issue
#1

Alright, So I am basically connecting a bunch of dialogs, and I am getting one error that is being a pain in the ass to fix...

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(5)
    {
        case 1:
        {
                switch(1)
                {
                    case 0:
                    {
                        ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Age","Please enter your desired age below!","Select","Back");
                    }
                    case 1:
                    {
                        ShowPlayerDialog(playerid, 7, DIALOG_STYLE_INPUT, "Height","Please enter your desired height below!","Select","Back");
                    }
                    case 2:
                    {
                        ShowPlayerDialog(playerid, 8, DIALOG_STYLE_INPUT, "Weight","Please enter your desired weight below!","Select","Back");
                    }
                    case 3:
                    {
                        ShowPlayerDialog(playerid, 9, DIALOG_STYLE_INPUT, "Hair","Please enter your desired hair color below!","Select","Back");
                    }
                    case 4:
                    {
                        ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "Eyes","Please enter your desired eye color below!","Select","Back");
                    }
                    case 5:
                    {
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_INPUT, "Complexion","Please enter your desired skin tone! (I.E. Black)","Select","Back");
                    }
                    case 6:
                    {
                        ShowPlayerDialog(playerid, 12, DIALOG_STYLE_INPUT, "Gender","Please enter your desired gender!","Select","Back");
                    }
                    case 7:
                    {
                        ShowPlayerDialog(playerid, 13, DIALOG_STYLE_INPUT, "Origin","Please enter your desired origin","Select","Back");
                    }
                    case 8:
                    {
                        ShowPlayerDialog(playerid, 14, DIALOG_STYLE_INPUT, "Scars/Birthmarks","Please enter any desired scars or birthmarks","Select","Back");
                    }
                    case 9:
                    {
                        ShowPlayerDialog(playerid, 15, DIALOG_STYLE_INPUT, "Accent","Please enter your desired accent!","Select","Back");
                    }
                    case 10:
                    {
                        ShowPlayerDialog(playerid, 16, DIALOG_STYLE_INPUT, "Build","Please enter your desired body status!","Select","Back");
                    }
                }
            }
            case 0:
            {
                SendClientMessage(playerid, 0xFF0006FF, "Your options have been saved!");
            }
        }
            //All the other millions go here...
    }
    return 0;
}
Код:
C:\Documents and Settings\nmader\Desktop\Lost Roleplay\filterscripts\EXCRegister.pwn(287) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
I have tried turning the "return 0;" to a "return 1;", so don't even suggest that.
Reply
#2

pawn Код:
switch(5) // ??? What is this? Makes no sense, invalid declaration.
    {
        case 1:
        {
                switch(1) // ??? Same here, what is this?
                {
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
pawn Код:
switch(5) // ??? What is this? Makes no sense, invalid declaration.
    {
        case 1:
        {
                switch(1) // ??? Same here, what is this?
                {
The first switch, is switching the dialog ID to 5. The second switch is selecting which option, 1 being button one, 0 being button two.
Reply
#4

pawn Код:
switch(dialogid)
    {
        case 5:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0: ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Age","Please enter your desired age below!","Select","Back");
                    case 1: ShowPlayerDialog(playerid, 7, DIALOG_STYLE_INPUT, "Height","Please enter your desired height below!","Select","Back");
                    case 2: ShowPlayerDialog(playerid, 8, DIALOG_STYLE_INPUT, "Weight","Please enter your desired weight below!","Select","Back");
                    case 3: ShowPlayerDialog(playerid, 9, DIALOG_STYLE_INPUT, "Hair","Please enter your desired hair color below!","Select","Back");
                    case 4: ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "Eyes","Please enter your desired eye color below!","Select","Back");
                    case 5: ShowPlayerDialog(playerid, 11, DIALOG_STYLE_INPUT, "Complexion","Please enter your desired skin tone! (I.E. Black)","Select","Back");
                    case 6: ShowPlayerDialog(playerid, 12, DIALOG_STYLE_INPUT, "Gender","Please enter your desired gender!","Select","Back");
                    case 7: ShowPlayerDialog(playerid, 13, DIALOG_STYLE_INPUT, "Origin","Please enter your desired origin","Select","Back");
                    case 8: ShowPlayerDialog(playerid, 14, DIALOG_STYLE_INPUT, "Scars/Birthmarks","Please enter any desired scars or birthmarks","Select","Back");
                    case 9: ShowPlayerDialog(playerid, 15, DIALOG_STYLE_INPUT, "Accent","Please enter your desired accent!","Select","Back");
                    case 10: ShowPlayerDialog(playerid, 16, DIALOG_STYLE_INPUT, "Build","Please enter your desired body status!","Select","Back");
                }
            }
            else
            {
                SendClientMessage(playerid, 0xFF0006FF, "Your options have been saved!");
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)