dialog problem
#3

If you would properly indent your code, it would have been obvious:
Your code:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    {
    if(dialogid == 0)
    {
        switch(listitem)
        {
            case 0:
            {
                MoveObject(gate1,617.9326171875, -597.0185546875, 5.7547760009766,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Door1 is open please close it!");
            }
            case 1:
            {
                MoveObject(gate1,617.93273925781, -597.01947021484, 11.754776000977,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Thanks for closing the door!");
            }
            case 2:
            {
                MoveObject(gate2,617.82763671875, -601.54425048828, 5.9297771453857,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Door2 is open please close it!");
            }
            case 3:
            {
                MoveObject(gate2,617.82763671875, -601.54425048828, 11.754776000977,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Thanks for closing the door!");
            }
            case 4:
            {
                MoveObject(elevator,618.6357421875, -583.1748046875, 26.483013153076,7.0);
                SendClientMessage(playerid,0x33CCCCAA,"The elevator is going up!");
            }
            case 5:
            {
                MoveObject(elevator,618.63586425781, -583.17547607422, 17.233013153076,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"The elevator is going down!");
            }
        }

        return 1;
    }
Fixed:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 0)
    {
        switch(listitem)
        {
            case 0:
            {
                MoveObject(gate1,617.9326171875, -597.0185546875, 5.7547760009766,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Door1 is open please close it!");
            }
            case 1:
            {
                MoveObject(gate1,617.93273925781, -597.01947021484, 11.754776000977,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Thanks for closing the door!");
            }
            case 2:
            {
                MoveObject(gate2,617.82763671875, -601.54425048828, 5.9297771453857,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Door2 is open please close it!");
            }
            case 3:
            {
                MoveObject(gate2,617.82763671875, -601.54425048828, 11.754776000977,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"Thanks for closing the door!");
            }
            case 4:
            {
                MoveObject(elevator,618.6357421875, -583.1748046875, 26.483013153076,7.0);
                SendClientMessage(playerid,0x33CCCCAA,"The elevator is going up!");
            }
            case 5:
            {
                MoveObject(elevator,618.63586425781, -583.17547607422, 17.233013153076,5.0);
                SendClientMessage(playerid,0x33CCCCAA,"The elevator is going down!");
            }
        }
    }

    return 1;
}
You added one { too many near the top of your function and you were missing a } at the end.
Reply


Messages In This Thread
dialog problem - by a!DaN)_)-) - 14.02.2011, 17:23
Re: dialog problem - by Medal Of Honor team - 14.02.2011, 17:24
Re: dialog problem - by PowerPC603 - 14.02.2011, 17:33
Re: dialog problem - by a!DaN)_)-) - 14.02.2011, 17:34
Re: dialog problem - by a!DaN)_)-) - 14.02.2011, 17:52
Re: dialog problem - by Anteino - 14.02.2011, 20:28

Forum Jump:


Users browsing this thread: 2 Guest(s)