Dialog doesn't show up -
Malcor - 16.08.2013
pawn Код:
case DIALOG_MENU:
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT1, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT2, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
}
}
}
Re: Dialog doesn't show up -
RedJohn - 16.08.2013
Nothing wrong with this code.
Which dialog doesn't show up, ones under cases or DIALOG_MENU?
Re: Dialog doesn't show up -
Malcor - 16.08.2013
Yep, clicked DIALOG_MENU and nothing shows up.
Re: Dialog doesn't show up -
RedJohn - 16.08.2013
Show me your whole OnDialogResponse.
Re: Dialog doesn't show up -
Malcor - 16.08.2013
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_MENU:
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT1, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT2, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
}
}
}
case DIALOG_MENU_EDIT:
{
if(response)
{
switch(listitem)
{
case 0:
{
EditObject(playerid, 0);
pInfo[playerid][pCurrentEdit] = 0;
}
case 1:
{
pInfo[playerid][pSlotUsed] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have just removed object Slot 1 from your accessories.");
}
case 2:
{
new index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ;
pInfo[playerid][pSlot] = index;
pInfo[playerid][pModelID] = modelid;
pInfo[playerid][pBone] = boneid;
pInfo[playerid][pOffsetX] = fOffsetX;
pInfo[playerid][pOffsetY] = fOffsetY;
pInfo[playerid][pOffsetZ] = fOffsetZ;
pInfo[playerid][pRotX] = fRotX;
pInfo[playerid][pRotY] = fRotY;
pInfo[playerid][pRotZ] = fRotZ;
pInfo[playerid][pScaleX] = fScaleX;
pInfo[playerid][pScaleY] = fScaleY;
pInfo[playerid][pScaleZ] = fScaleZ;
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
}
case 3:
{
RemovePlayerAttachedObject(playerid, 0);
}
}
}
}
case DIALOG_MENU_EDIT1:
{
if(response)
{
switch(listitem)
{
case 0:
{
EditObject(playerid, 1);
pInfo[playerid][pCurrentEdit] = 1;
}
case 1:
{
pInfo[playerid][p1SlotUsed] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have just removed object Slot 2 from your accessories.");
}
case 2:
{
new index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ;
pInfo[playerid][p1Slot] = index;
pInfo[playerid][p1ModelID] = modelid;
pInfo[playerid][p1Bone] = boneid;
pInfo[playerid][p1OffsetX] = fOffsetX;
pInfo[playerid][p1OffsetY] = fOffsetY;
pInfo[playerid][p1OffsetZ] = fOffsetZ;
pInfo[playerid][p1RotX] = fRotX;
pInfo[playerid][p1RotY] = fRotY;
pInfo[playerid][p1RotZ] = fRotZ;
pInfo[playerid][p1ScaleX] = fScaleX;
pInfo[playerid][p1ScaleY] = fScaleY;
pInfo[playerid][p1ScaleZ] = fScaleZ;
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
}
case 3:
{
RemovePlayerAttachedObject(playerid, 1);
}
}
}
}
case DIALOG_MENU_EDIT2:
{
if(response)
{
switch(listitem)
{
case 0:
{
EditObject(playerid, 2);
pInfo[playerid][pCurrentEdit] = 3;
}
case 1:
{
pInfo[playerid][p2SlotUsed] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have just removed object Slot 3 from your accessories.");
}
case 2:
{
new index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ;
pInfo[playerid][p2Slot] = index;
pInfo[playerid][p2ModelID] = modelid;
pInfo[playerid][p2Bone] = boneid;
pInfo[playerid][p2OffsetX] = fOffsetX;
pInfo[playerid][p2OffsetY] = fOffsetY;
pInfo[playerid][p2OffsetZ] = fOffsetZ;
pInfo[playerid][p2RotX] = fRotX;
pInfo[playerid][p2RotY] = fRotY;
pInfo[playerid][p2RotZ] = fRotZ;
pInfo[playerid][p2ScaleX] = fScaleX;
pInfo[playerid][p2ScaleY] = fScaleY;
pInfo[playerid][p2ScaleZ] = fScaleZ;
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
}
case 3:
{
RemovePlayerAttachedObject(playerid, 2);
}
}
}
}
}
return 1;
}
Re: Dialog doesn't show up -
RedJohn - 16.08.2013
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_MENU:
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT1, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_MENU_EDIT2, DIALOG_STYLE_LIST,"My Accessories", "Adjust Object\nDelete Permanently\nUse Accessories\nRemove Accessories", "Select", "Cancel");
}
}
}
return 1;
}
case DIALOG_MENU_EDIT:
{
if(response)
{
switch(listitem)
{
case 0:
{
EditObject(playerid, 0);
pInfo[playerid][pCurrentEdit] = 0;
}
case 1:
{
pInfo[playerid][pSlotUsed] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have just removed object Slot 1 from your accessories.");
}
case 2:
{
new index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ;
pInfo[playerid][pSlot] = index;
pInfo[playerid][pModelID] = modelid;
pInfo[playerid][pBone] = boneid;
pInfo[playerid][pOffsetX] = fOffsetX;
pInfo[playerid][pOffsetY] = fOffsetY;
pInfo[playerid][pOffsetZ] = fOffsetZ;
pInfo[playerid][pRotX] = fRotX;
pInfo[playerid][pRotY] = fRotY;
pInfo[playerid][pRotZ] = fRotZ;
pInfo[playerid][pScaleX] = fScaleX;
pInfo[playerid][pScaleY] = fScaleY;
pInfo[playerid][pScaleZ] = fScaleZ;
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
}
case 3:
{
RemovePlayerAttachedObject(playerid, 0);
}
}
}
return 1;
}
case DIALOG_MENU_EDIT1:
{
if(response)
{
switch(listitem)
{
case 0:
{
EditObject(playerid, 1);
pInfo[playerid][pCurrentEdit] = 1;
}
case 1:
{
pInfo[playerid][p1SlotUsed] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have just removed object Slot 2 from your accessories.");
}
case 2:
{
new index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ;
pInfo[playerid][p1Slot] = index;
pInfo[playerid][p1ModelID] = modelid;
pInfo[playerid][p1Bone] = boneid;
pInfo[playerid][p1OffsetX] = fOffsetX;
pInfo[playerid][p1OffsetY] = fOffsetY;
pInfo[playerid][p1OffsetZ] = fOffsetZ;
pInfo[playerid][p1RotX] = fRotX;
pInfo[playerid][p1RotY] = fRotY;
pInfo[playerid][p1RotZ] = fRotZ;
pInfo[playerid][p1ScaleX] = fScaleX;
pInfo[playerid][p1ScaleY] = fScaleY;
pInfo[playerid][p1ScaleZ] = fScaleZ;
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
}
case 3:
{
RemovePlayerAttachedObject(playerid, 1);
}
}
}
return 1;
}
case DIALOG_MENU_EDIT2:
{
if(response)
{
switch(listitem)
{
case 0:
{
EditObject(playerid, 2);
pInfo[playerid][pCurrentEdit] = 3;
}
case 1:
{
pInfo[playerid][p2SlotUsed] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have just removed object Slot 3 from your accessories.");
}
case 2:
{
new index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ;
pInfo[playerid][p2Slot] = index;
pInfo[playerid][p2ModelID] = modelid;
pInfo[playerid][p2Bone] = boneid;
pInfo[playerid][p2OffsetX] = fOffsetX;
pInfo[playerid][p2OffsetY] = fOffsetY;
pInfo[playerid][p2OffsetZ] = fOffsetZ;
pInfo[playerid][p2RotX] = fRotX;
pInfo[playerid][p2RotY] = fRotY;
pInfo[playerid][p2RotZ] = fRotZ;
pInfo[playerid][p2ScaleX] = fScaleX;
pInfo[playerid][p2ScaleY] = fScaleY;
pInfo[playerid][p2ScaleZ] = fScaleZ;
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
}
case 3:
{
RemovePlayerAttachedObject(playerid, 2);
}
}
}
}
return 1;
}
return 1;
Try this. Untested.
Re: Dialog doesn't show up -
Malcor - 16.08.2013
F:\Projects\Neusagamers Roleplay\filterscripts\tooys.pwn(345) : error 002: only a single statement (or expression) can follow each "case"
F:\Projects\Neusagamers Roleplay\filterscripts\tooys.pwn(345) : warning 215: expression has no effect
F:\Projects\Neusagamers Roleplay\filterscripts\tooys.pwn(346) : warning 209: function "OnDialogResponse" should return a value
F:\Projects\Neusagamers Roleplay\filterscripts\tooys.pwn(347) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.