Dialog doesn't show up!
#1

Hi! Recently seems like my dialog doesn't work and i cant find the problem.

pawn Код:
format(titlestring, sizeof(titlestring), "{00C0FF}CW:RP Login,{FFFFFF} welcome back %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "{FFFFFF}Welcome back to GTA-IL Roleplay, %s.\nThis account is {99FF33}REGISTERED{FFFFFF}, please enter the password to login.\n\n{FFFFFF}GTA-IL - Israel GTA Community\n{00C0FF}Our forum address is: www.gta-il.net\n{00C0FF}Our teamspeak address is: 109.226.13.2:90299", GetPlayerNameEx(playerid), GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PASSWORD,titlestring,string,"Login","Exit");
pawn Код:
#define MAINMENU 31767
[00:44:49] [debug] Run time error 4: "Array index out of bounds"
[00:44:49] [debug] Accessing element at index 9 past array upper bound 8
[00:44:49] [debug] AMX backtrace:
[00:44:49] [debug] #0 0006332c in ?? (0x00000001) from EXRPR46.amx
[00:44:49] [debug] #1 00064754 in public SafeLogin (0x00000001) from EXRPR46.amx

pawn Код:
public SafeLogin(playerid)
{
    // Main Menu Features.
    ShowMainMenuGUI(playerid);
    SetPlayerJoinCamera(playerid);
    ClearChatbox(playerid);
    SetPlayerVirtualWorld(playerid, 0);

    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    if(doesAccountExist(playername))
    {
        gPlayerAccount[playerid] = 1;
        ShowMainMenuDialog(playerid, 1);
    }
    else
    {
        if(strfind(playername, "_", true) == -1)
        {
            SendClientMessageEx( playerid, COLOR_WHITE, "Connection rejected. Please get a name in the correct format: Firstname_Lastname.");
        }
        else
        {
            gPlayerAccount[playerid] = 0;
            ShowMainMenuDialog(playerid, 2);
        }
    }
    return 1;
}

Why the dialog doesnt show up?? help please!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)