OnDialogResponse doesn't respond. -
Padarom - 01.09.2011
Hello,
I've expanded my dialogs a few minutes ago (before case 2 was also present, but with return 1; instead of any useful code) and since then the dialog doesn't react to any of the listitems. For information: it is a list-dialog with 3 choices and the following code. After I undid the changes the problem was still existing. Other dialogs above are working, so it has to be because of the code (the following dialogs also don't work - disregard, the following dialogs DO work).
pawn Код:
if(dialogid == changefrak && response)
{
new home[20];
GetPVarString(playerid,"heimat",home,20);
IsATC[playerid] = false;
atcbelegt[ATCPos[playerid]] = false;
ATCPos[playerid] = -1;
switch(listitem)
{
case 0:
{
if(!strcmp(home,"ls"))
{
SetPlayerPos(playerid,1887.5907,-2393.4739,13.5391);
SetPlayerFacingAngle(playerid,281.8907);
SetPlayerSkin(playerid, 61);
}
else if(!strcmp(home,"lv"))
{
SetPlayerPos(playerid,1595.2727,1448.6219,10.8282);
SetPlayerFacingAngle(playerid,86.6821);
SetPlayerSkin(playerid, 61);
}
else if(!strcmp(home,"sf"))
{
SetPlayerPos(playerid,-1264.0547,23.0747,14.1484);
SetPlayerFacingAngle(playerid,133.7686);
SetPlayerSkin(playerid, 61);
}
}
case 1:
{
if(!strcmp(home,"ls"))
{
SetPlayerPos(playerid,2019.4186,-2443.2949,13.5469);
SetPlayerFacingAngle(playerid,87.9982);
SetPlayerSkin(playerid, 16);
}
else if(!strcmp(home,"lv"))
{
SetPlayerPos(playerid,1318.7860,1256.9487,10.8203);
SetPlayerFacingAngle(playerid,0.8514);
SetPlayerSkin(playerid, 16);
}
else if(!strcmp(home,"sf"))
{
SetPlayerPos(playerid,-1225.8724,49.1484,14.1346);
SetPlayerFacingAngle(playerid,226.0345);
SetPlayerSkin(playerid, 16);
}
}
case 2:
{
ShowPlayerDialog(playerid, atcpos, DIALOG_STYLE_LIST, "Position auswдhlen.", "Tower\r\nDelivery","Auswдhlen","Abbrechen");
}
}
return 1;
}
I hope you can help me.
Regards
Padarom
AW: OnDialogResponse doesn't respond. -
Padarom - 01.09.2011
Does nobody see were the problem is?
Re: OnDialogResponse doesn't respond. -
Zonoya - 01.09.2011
no sorry
Re: OnDialogResponse doesn't respond. -
[MG]Dimi - 01.09.2011
Quote:
Originally Posted by [AC]Bella
no sorry
|
WHy did you post then? -.-
On Topic: negative (!) strcmp ALWAYS returns 1. Try adding that
AW: OnDialogResponse doesn't respond. -
Padarom - 01.09.2011
@Dimi: What do you mean? It worked the whole time (case 0 and 1), but since I've added case 2 it doesnt work anymore (also if I undo the step).
Re: OnDialogResponse doesn't respond. -
Mean - 02.09.2011
Quote:
Originally Posted by [MG]Dimi
On Topic: negative (!) strcmp ALWAYS returns 1. Try adding that
|
No, with "!" it returns 0 when the string doesn't match. A function that always returns the same would be frankly useless.