Mess with dialog buttons
#9

Sorry for bump but problem isn't fully solved yet..
And I were busy so I couldn't work with it but now I do..


Anyway:

I have a dialog but if you click the first item in the list it won't happen anything..
But all the others work...

Code:

pawn Код:
ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, "Help", "Gameplay\nTurfs\nCommands\t", "Ok", "Close");
OnDialogResponse

pawn Код:
if(dialogid == DIALOG_HELP)
        {
            if(response) // Button 1
            {
               
            }
            if(listitem == 0)
            {
               
            }
            if (listitem == 1)
            {
                SendClientMessage(playerid, Green, "Test display, first should be first altenative(?)");
            }
            if(listitem == 2)
            {
                SendClientMessage(playerid, Green, "Test display, Secound(?)");
            }
            if(listitem == 3)
            {
                SendClientMessage(playerid, Green, "Test display turfs ?)");
            }
            return 1;
        }
        return 0;
    }

I have tired with I switch instead

(I knew what a switch were when I saw the function I just forgot the name...)

But if I use it, it will just show up:

Код:

D:\Davids\Scripting\Server Las Venturasmix\LV - Test.pwn(1584) : error 014: invalid statement; not in switch
D:\Davids\Scripting\Server Las Venturasmix\LV - Test.pwn(1584) : warning 215: expression has no effect
D:\Davids\Scripting\Server Las Venturas mix\LV - Test.pwn(1584) : error 001: expected token: ";", but found ":"
D:\Davids\Scripting\Server Las Venturasmix\LV - Test.pwn(1584) : error 029: invalid expression, assumed zero
D:\Davids\Scripting\Server Las Venturas mix\LV - Test.pwn(1584) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Code:

pawn Код:
case DIALOG_HELP:
                {
                    if(response) // Button 1
                    {
                        switch(listitem)
                       {
                        case 0:
                        {
                        SendClientMessage(playerid, Green, "Test display, first should be first altenative(?)");
                        }
                        case 1:
                        {
                        SendClientMessage(playerid, Green, "Test display, Secound(?)");
                        }
                        case 2:
                        {
                        SendClientMessage(playerid, Green, "Test display turfs ?)");
                        }
                        return 1;
                    }
                    return 0;
                }
Reply


Messages In This Thread
Mess with dialog buttons - by davve95 - 08.08.2013, 19:13
Re: Mess with dialog buttons - by Elysian` - 08.08.2013, 19:17
Re: Mess with dialog buttons - by niels44 - 08.08.2013, 19:20
Re: Mess with dialog buttons - by ThePhenix - 08.08.2013, 19:22
Re: Mess with dialog buttons - by Scenario - 08.08.2013, 19:26
Re: Mess with dialog buttons - by davve95 - 08.08.2013, 20:19
Re: Mess with dialog buttons - by Scenario - 08.08.2013, 20:25
Re: Mess with dialog buttons - by Elysian` - 08.08.2013, 20:26
Re: Mess with dialog buttons - by davve95 - 18.08.2013, 14:57
Re: Mess with dialog buttons - by Scenario - 19.08.2013, 13:33

Forum Jump:


Users browsing this thread: 2 Guest(s)