PDA

View Full Version : Dialog Won't Show?


ChromeAmazing
24/03/2015, 10:39 PM
Everytime I want to use /editfaction, I can't appear to be able to open this dialog when I choose edit ranks.

Here is the code used when the dialog is opened.

stock ShowRankEdit(playerid)
{
new string[952];
strcat(string, "1. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank1]);
strcat(string, "2. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank2]);
strcat(string, "3. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank3]);
strcat(string, "4. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank4]);
strcat(string, "5. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank5]);
strcat(string, "6. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank6]);
strcat(string, "7. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank7]);
strcat(string, "8. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank8]);
strcat(string, "9. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank9]);
strcat(string, "10. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank10]);
strcat(string, "11. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank11]);
strcat(string, "12. %s", FactionInfo[PlayerInfo[playerid][FactionID]][fRank12]);
ShowPlayerDialog(playerid, DAILOG_RANKEDIT, DIALOG_STYLE_LIST,"{FFFFFF}Faction Settings",string,"Select","");
return 1;
}

Here is the code used to open the dialog.

case 0:
{
ShowRankEdit(playerid);
return 1;
}

RedCode
24/03/2015, 10:55 PM
here enum

enum
{
DAILOG_RANKEDIT
}

here define

#define DAILOG_RANKEDIT 5555

ChromeAmazing
24/03/2015, 11:35 PM
Already has been defined, and no, still does not work.

Thank you for a response though.

AlexBlack
24/03/2015, 11:38 PM
strcat(string, "1. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank1]);
strcat(string, "2. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank2]);
strcat(string, "3. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank3]);
strcat(string, "4. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank4]);
strcat(string, "5. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank5]);
strcat(string, "6. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank6]);
strcat(string, "7. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank7]);
strcat(string, "8. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank8]);
strcat(string, "9. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank9]);
strcat(string, "10. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank10]);
strcat(string, "11. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank11]);
strcat(string, "12. %s", FactionInfo[PlayerInfo[playerid][FactionID]][fRank12]);

I think that is invalide fonctions

ChromeAmazing
24/03/2015, 11:39 PM
strcat(string, "1. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank1]);
strcat(string, "2. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank2]);
strcat(string, "3. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank3]);
strcat(string, "4. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank4]);
strcat(string, "5. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank5]);
strcat(string, "6. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank6]);
strcat(string, "7. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank7]);
strcat(string, "8. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank8]);
strcat(string, "9. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank9]);
strcat(string, "10. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank10]);
strcat(string, "11. %s\n", FactionInfo[PlayerInfo[playerid][FactionID]][fRank11]);
strcat(string, "12. %s", FactionInfo[PlayerInfo[playerid][FactionID]][fRank12]);

I think that is invalide fonctions

Those functions are valid, it's the dialog that won't open.

bartekdvd
24/03/2015, 11:41 PM
Are you sure that ShowRankEdit procedure is being called? Maybe it doesn't even hit case 0: in your switch statement?

AlexBlack
24/03/2015, 11:42 PM
Try to make it with SendClientMessage fonction, then you can confirm that fonctions work and that's not the problem.

ChromeAmazing
25/03/2015, 12:07 AM
They work, tested.

ChromeAmazing
26/03/2015, 08:40 PM
Still need help.