Master Accounts Not Loading (2nd post)
#1

Tried everything to fix this but still can't get it to load the data.

pawn Код:
stock LoadCharacterAccounts(playerid)
{
    new count = 0,CharacterName[MAX_PLAYER_NAME];
    format(MasterAccounts[playerid][CharacterString], 128,"");

    format(Query,sizeof(Query),"SELECT * FROM `characters` WHERE `MasterID` = '%d'",MasterAccounts[playerid][MasterAccountID]);
    mysql_query(Query);
    count = mysql_num_rows();
    mysql_store_result();

    if(count == 0)
    {
        ShowPlayerDialog(playerid, 200, DIALOG_STYLE_LIST, "Your Characters", "None to load, create one on the ucp", "", "Quit");
    }
    for(new a; a < count; a++)
    {
        mysql_fetch_field_row(CharacterName,"CharacterName");
        format(MasterAccounts[playerid][CharacterString], 128, "%s\n%s", MasterAccounts[playerid][CharacterString], strreplace(CharacterName, '_', ' '));
        printf("Character %s ,Owned By %s has been loaded",CharacterInfo[playerid][Character], GetOriginalName(playerid));
    }
    if(strlen(MasterAccounts[playerid][CharacterString]) >= 1) { ShowPlayerDialog(playerid, 200, DIALOG_STYLE_LIST, "Your Characters", MasterAccounts[playerid][CharacterString], "Select", "Quit"); }
    mysql_free_result();
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)