Rather strange dialog problem
#1

pawn Код:
case ListAccountsDialog:
{
    if (!response)
    {
        Kick(playerid);
    }
    else
    {
        print(inputtext);
        if(!strcmp(inputtext, LoginPlayerName[playerid][1]))
        {
            print("1");
            LoadCharacterStats(playerid, LoginPlayerName[playerid][1]);
        }
        else if(!strcmp(inputtext, LoginPlayerName[playerid][2]))
        {
            print("2");
            LoadCharacterStats(playerid, LoginPlayerName[playerid][2]);
        }
        else if(!strcmp(inputtext, LoginPlayerName[playerid][3]))
        {
            print("3");
            LoadCharacterStats(playerid, LoginPlayerName[playerid][3]);
        }
        else if(!strcmp(inputtext, "Register a new character"))
        {
            print("4");
            ShowPlayerDialog(playerid, RegisterNewCharacter, DIALOG_STYLE_INPUT, "New Character", "Type in your new characters name", "Next", "Back");
        }
    }
    return 1;
}
I have a list dialog when you login, where you can pick your character. It then passes it over to OnDialogReponse, which looks like this. What I don't understand is why it jumps to the first function and prints "1". The inputtext prints "Register a new character", still it jumps to the first one. Does anyone have an explanation for why this happening?

I've never encountered anything like this before, so I'm thankful for all the help I can get.
Reply


Messages In This Thread
Rather strange dialog problem - by Knappen - 19.03.2013, 21:13
Re: Rather strange dialog problem - by Misiur - 19.03.2013, 21:17
Re: Rather strange dialog problem - by Vince - 19.03.2013, 21:17
Re: Rather strange dialog problem - by Knappen - 19.03.2013, 21:20
Re: Rather strange dialog problem - by Knappen - 19.03.2013, 21:30

Forum Jump:


Users browsing this thread: 2 Guest(s)