SQL Error
#1

Here i'm trying to display top ten online players list but fails

pawn Код:
CMD:top10on(playerid, params[])
{
    new full_info[500];
    for(new row, rows = cache_get_row_count(mysql); row < rows; row ++)
    {
        new
            username[MAX_PLAYER_NAME + 1],
            pphour,
            ppmins,
            ID,
            sub_info[50]
        ;
        ID ++;
        cache_get_field_content(row, "user", username, mysql);
        pphour = cache_get_field_content_int(row, "phours", mysql);
        ppmins = cache_get_field_content_int(row, "pminutes", mysql);

        format(sub_info, sizeof(sub_info), "%s"ccwhite"%d. %s with "ccgreen"%d "ccwhite"hours, "ccgreen"%d "ccwhite"minutes\n", row + 1, ID, username, pphour, ppmins);
        strcat(full_info, sub_info);

    }
    ShowPlayerDialog(playerid, 1101, DIALOG_STYLE_MSGBOX, "Top 10 Online", full_info, "OK", "Cancel");
    return 1;
}
This is what shows in the log

Quote:

[22:08:13] [DEBUG] cache_get_row_count - connection: 1
[22:08:13] [WARNING] cache_get_row_count - no active cache

Why is that error, how could it be fixed?
Reply


Messages In This Thread
SQL Error - by Bondage - 04.10.2015, 18:12
Re: SQL Error - by J0sh... - 04.10.2015, 18:16
Re: SQL Error - by Bondage - 04.10.2015, 18:24
Re: SQL Error - by d1git - 04.10.2015, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)