08.04.2017, 09:11
Hello, quick question.
Why would the code giving me a tag mismatch, even when the forwarded variable is originally defined in an enum, then forwarded from OnDialogResponse to a function called "TogglePCPSettings" ? I can't seem to understand the compiler here. The case under "OnDialogResponse" throws no warnings. (switch(dialogid)).
Why would the code giving me a tag mismatch, even when the forwarded variable is originally defined in an enum, then forwarded from OnDialogResponse to a function called "TogglePCPSettings" ? I can't seem to understand the compiler here. The case under "OnDialogResponse" throws no warnings. (switch(dialogid)).
PHP код:
enum dialogids
{
...,
...,
pcpSettings,
...,
...
};
TogglePCPSettings(playerid, dialogid, listitem)
{
if(dialogid == pcpSettings) //Giving a tag mismatch.
{
if(listitem == 1)
{
..
}
..
}
//OnDialogResponse:
case pcpSettings:
{
if(!response)
ShowPCPMenu(playerid);
else
{
TogglePCPSettings(playerid, dialogid, listitem);
}
return 1;
}