easyDialog issue.
#1

Hello,

I've been trying to fix this issue for a while. Before I start, I've already included the easyDialog.inc. I'm having an issue with getting the code to run. The dialogs show however the code under the dialogs don't. I've done some debugging and I know that the code doesn't execute.

pawn Code:
public OnAccountCheck(playerid)
{
    print("OnAccountCheck() called");
    new rows, fields, DialogS[356];
    cache_get_data(rows, fields, dbHandle);
    if(!rows) {
        format(DialogS, sizeof(DialogS), "\n{0085BA}Player Registration\n{ffffff}Nick: {0085BA}%s{ffffff}\nYou must {ff0000}not{ffffff} register multiple account.\nYou must {ff0000}not{ffffff} use an insecure password.\nMinimum: {ff0000}6 Characters{ffffff}\n\nPlease Enter A {CCBB00}Password{ffffff} For Your Account:", ReturnPlayerName(playerid));
        Dialog_Show(playerid, RegisterDialog, DIALOG_STYLE_PASSWORD, "LSCnR Registration", DialogS, "Register", "Cancel");
        if(Dialog_Opened(playerid) == 1) {
            print("Dialog Open.");
        }
        return 1;
    }
    else
    {
        format(DialogS, sizeof(DialogS), "\n{0085BA}Player Login\n{ffffff}This nick, {0085BA}%s{ffffff} is registered.\nIf this is not your account, please quit and change your nick.\n\nPlease Enter Your {CCBB00}Password{ffffff} To Login:", ReturnPlayerName(playerid));
        Dialog_Show(playerid, LoginDialog, DIALOG_STYLE_PASSWORD, "LSCnR Login", DialogS, "Login", "Cancel");
        return 1;
    }
}

pawn Code:
Dialog:RegisterDialog(playerid, response, listitem, inputtext[])
{
    if(!response)
    {
        AdminPunishment(playerid, "KICK", "Invalid Login");
        KickPlayer(playerid);
        return 1;
    }
    else if(response)
    {
        print("RegisterDialog() called.");
        if(strlen(inputtext) <= 6) {
            new DialogS[356];
            format(DialogS, sizeof(DialogS), "\n{0085BA}Player Registration\n{ffffff}Nick: {0085BA}%s{ffffff}\nYou must {ff0000}not{ffffff} register multiple account.\nYou must {ff0000}not{ffffff} use an insecure password.\nMinimum: {ff0000}6 Characters{ffffff}\n{ff0000}Your password must be greater than 6 characters.{ffffff}\nPlease Enter A {CCBB00}Password{ffffff} For Your Account:", ReturnPlayerName(playerid));
            Dialog_Show(playerid, RegisterDialog, DIALOG_STYLE_PASSWORD, "LSCnR Registration", DialogS, "Register", "Cancel");
        }
       
        new Query[90];
        mysql_format(dbHandle, Query, sizeof(Query), "INSERT INTO `users`(`Username`, `Password`, `IP_Address`) VALUES('%s', MD5('%s'), '%s')", ReturnPlayerName(playerid), inputtext, ReturnPlayerIP(playerid));
        mysql_tquery(dbHandle, Query, "", "");
       
        GivePlayerMoney(playerid, 5000);
       
        SendClientMessage(playerid, -1, "You have successfully registered.");
    }
    return 1;
}
Reply
#2

Try defining some shizzle with some extra strings?
Reply
#3

Still a problem. Bump..
Reply
#4

Show the debug
Reply
#5

Thanks for the help but I've completely given up with easyDialog.
Reply
#6

//EDIT: just checked emmet's post & it seems like i've got an older version here... but hey.. it's working, wanna have it?

whats this "Dialog_Show" ? isn't it "ShowDialog" ?

not sure, i was away for a long time but i remember it being like this:

calling a dialog
pawn Code:
ShowDialog(playerid, Show:Stats, DIALOG_STYLE_MSGBOX,"Your Stats",s,"Ok","");
and the code like this
pawn Code:
Dialog:Stats(playerid, response, listitem, inputtext[])
{
    //your code
    return 1;
}
& it works like a charm, even today after so many months its still working (well, why not xD)
Reply
#7

Yeah mate, if you could upload that and PM me a link I'd be really grateful.
Reply
#8

Quote:
Originally Posted by Isolated
View Post
Yeah mate, if you could upload that and PM me a link I'd be really grateful.
check your inbox
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)