MySQL no active cache issue
#1

Hello everybody, and before any of you go keyboard warrior mode, i did actually research it on ****** and found at least a dozen of posts, none of which actually helped my solve my issue, that's why I'm here.

Using the following code, i get the no active cache issue (cache_get_row_count: no active cache):
pawn Code:
LoadAvailableBounties(playerid)
{
    new DB_Query[256];
    mysql_format(Database, DB_Query, sizeof(DB_Query), "SELECT * FROM `player_bounties`");
    mysql_tquery(Database, DB_Query, "LoadBounties", "i", playerid);
    printf("%s", DB_Query); // the query is printed correctly
}

forward LoadBounties(playerid);
public LoadBounties(playerid)
{
    if(cache_num_rows()>0) // the error line is here and fairly enough, only the first entry is shown in the dialog
    {
        new target, hitprice;
        for(new i; i<cache_num_rows(); i++)
        {
            cache_get_value_int(i, "hitid", target);
            cache_get_value_int(i, "amount", hitprice);
            // some more code not mysql related
        }
    }
    return 1;
}

CMD:bounties(playerid, params[])
{
    LoadAvailableBounties(playerid);
    return 1;
}
Thanks a lot!
Reply


Messages In This Thread
MySQL no active cache issue - by Adamoneoone - 09.05.2020, 09:58
Re: MySQL no active cache issue - by BaFFyJunior - 09.05.2020, 12:18
Re: MySQL no active cache issue - by Adamoneoone - 09.05.2020, 12:48
Re: MySQL no active cache issue - by Calisthenics - 09.05.2020, 13:13
Re: MySQL no active cache issue - by Adamoneoone - 09.05.2020, 13:24
Re: MySQL no active cache issue - by Calisthenics - 09.05.2020, 13:27
Re: MySQL no active cache issue - by Adamoneoone - 09.05.2020, 13:31
Re: MySQL no active cache issue - by Calisthenics - 09.05.2020, 13:36
Re: MySQL no active cache issue - by Adamoneoone - 09.05.2020, 14:37

Forum Jump:


Users browsing this thread: 1 Guest(s)