Problem with my character system [MySQL]
#6

My printf's aren't even showing now. This is my new LoadCharacterNames:

pawn Код:
stock LoadCharacterNames(playerid)
{
    new string[128];
    format(string, sizeof(string), "SELECT * FROM accounts WHERE Username = '%s'", pInfo[playerid][Username]);
    mysql_query(string, THREAD_LOAD_CNAMES, playerid, iConnectionHandle);
    return 1;
}
And the thread under OnQueryFinish:

pawn Код:
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
    new
        szMessage[128],
        szQuery[256];

    #pragma unused szQuery

    switch(resultid)
    {
//Other threads, blablabla
        case THREAD_LOAD_CNAMES:
        {
            printf("%i", mysql_num_rows(connectionHandle));
            mysql_store_result(connectionHandle);
            mysql_retrieve_row();
           
            mysql_fetch_field_row(PlayerCharacters[extraid][0], "Character1", connectionHandle);
            mysql_fetch_field_row(PlayerCharacters[extraid][1], "Character2", connectionHandle);
            mysql_fetch_field_row(PlayerCharacters[extraid][2], "Character3", connectionHandle);
           
            printf(PlayerCharacters[extraid][0]);
            printf(PlayerCharacters[extraid][1]);
            printf(PlayerCharacters[extraid][2]);
           
            mysql_free_result(connectionHandle);
        }
    }
    return 1;
}
The printf's aren't even working, so I don't even know what's wrong.
Reply


Messages In This Thread
Problem with my character system [MySQL] - by Kindred - 23.06.2013, 02:56
Re: Problem with my character system [MySQL] - by Kindred - 24.06.2013, 03:27
Re: Problem with my character system [MySQL] - by Scenario - 24.06.2013, 03:35
Re: Problem with my character system [MySQL] - by Kindred - 24.06.2013, 04:30
Re: Problem with my character system [MySQL] - by Scenario - 24.06.2013, 04:36
Re: Problem with my character system [MySQL] - by Kindred - 24.06.2013, 04:45
Re: Problem with my character system [MySQL] - by Scenario - 24.06.2013, 04:57

Forum Jump:


Users browsing this thread: 1 Guest(s)