18.08.2013, 14:57
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:
OnDialogResponse
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:
Code:
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");
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;
}