Function Not Running When Stated..
#1

The title pretty much says it all. (Hopefully)


pawn Код:
forward CheckAccount_Ban(playerid);
public CheckAccount_Ban(playerid)
{
    new tmp[175];
    // THIS PART HAS BEEN REMOVED FOR SCRIPT SAFETY
    mysql_function_query(MySQL_Connection, tmp, true, "CheckAccountStatus_Ban", "i", playerid);
    return true;
}

forward CheckAccountStatus_Ban(playerid);
public CheckAccountStatus_Ban(playerid)
{
    new rows, fields;
    cache_get_data(rows, fields, MySQL_Connection);
    if(rows > 0)
    {
        new tmp_name[42], tmp_ip[16], tmpstr[400];
        cache_fetch_string(0, "Username", tmp_name);
        cache_fetch_string(0, "IP",tmp_ip);

        format(tmpstr,sizeof(tmpstr), "| Ban Information |\nBanned By: %s\nBanned For: %s\nBanned On: %s\n\n\nIf you have not taken a screenshot of the ban when our staff banned you\nyou can use this as the same.", cache_return_data(0, "BannedBy"), cache_return_data(0, "Reason"), cache_return_data(0, "Date"));        
        Dialog_Show(playerid, DialogBanInfo, DIALOG_STYLE_MSGBOX, "BAN INFORMATION", tmpstr, "Close", "");
    } else {
        CheckIfAccountExists(playerid); // THIS IS THE FUNCTION
        print("RUNNING ACCOUNT CHECK");
    }
    return true;
}

forward CheckAccount_Exists(playerid); // THIS IS THE FUNCTION
public CheckAccount_Exists(playerid) // THIS IS THE FUNCTION
{
    new tmp[175];
    // THIS PART HAS BEEN REMOVED FOR SCRIPT SAFETY
    mysql_function_query(MySQL_Connection, tmp, true, "CheckIfAccountExists", "i", playerid);
    print("RUNNING ACCOUNT CHECK");
    return true;
}

forward CheckIfAccountExists(playerid);
public CheckIfAccountExists(playerid)
{
    new rows, fields;
    cache_get_data(rows, fields, MySQL_Connection);

    if (rows)
    {
        Dialog_Show(playerid, DialogLogin, DIALOG_STYLE_MSGBOX, "Account Login", "", "Continue", "");
    } else {
        Dialog_Show(playerid, DialogRegister, DIALOG_STYLE_MSGBOX, "Account Registration", "", "Continue", "");
    }    
    return true;
}
Reply
#2

[This got stomped down by the mas-amount of threads and replies.]
Reply
#3

Nowhere do you call "CheckAccount_Exists".
Reply
#4

Quote:
Originally Posted by Virtual1ty
Посмотреть сообщение
Nowhere do you call "CheckAccount_Exists".
For fuck sake, thanks (It was late, too much to drink.... the list is long with the incompatible)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)