wrong format
#1

pawn Код:
else if(dialogid == DIALOG_AFACTION)
    {
        if(response)
        {
            if(listitem == 0) ShowPlayerDialog(playerid, DIALOG_CFACTION, DIALOG_STYLE_INPUT, "Create a Faction", "Please enter the name of the faction you're going to create.", "Continue", "Quit");
            else if(listitem == 1) {
                new tempName[12][126];
                for(new i = 1; i <= sizeof(FactionData); i++)
                {
                    if(FactionData[i][Created]) format(tempName[i], 126, "(%d) %s", i, FactionData[i][FactionName]);
                    else format(tempName[i], 126, "(%d) Empty", i);
                    format(string, sizeof(string), "%s\n", tempName[i]);
                }
                ShowPlayerDialog(playerid, DIALOG_EFACTION, DIALOG_STYLE_LIST, "Edit a Faction", string, "Select", "Quit");
            }
        }
        return 1;
    }
I'm trying to loop through FactionData, and if Created is true, then format tempName the FactionName, otherwise just format it Empty, and then show the list in the dialog, not sure where I went wrong. Thanks in advance. No errors by the way, the dialog just does not show.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)