02.07.2018, 16:44
Hi guys, i got this error in my mysql.log
And this is my code
Can you guys help me? Thankss!
Код:
[23:24:09] [ERROR] cache_get_row_count: no active cache (D:\SAMPSERVER\Roleplay\pawno\include\a_mysql.inc:182 -> Stock/stock.pwn:48 -> Publics/ODR/registerlogin.pwn:21)
PHP код:
AssignPlayerData(playerid); // LINE: 21 (This code is only for calling AssignPlayerData)
PHP код:
stock AssignPlayerData(playerid)
{
new rows = cache_num_rows(); //Error line: 48
if(rows)
{
new loaded;
while(loaded < rows)
{
cache_get_value_int(loaded, "id", pInfo[playerid][ID]);
cache_get_value_int(loaded, "kills", pInfo[playerid][pKills]);
cache_get_value_int(loaded, "deaths", pInfo[playerid][pDeaths]);
cache_get_value_int(loaded, "admin", pInfo[playerid][pAdmin]);
cache_get_value_int(loaded, "vip", pInfo[playerid][pVIP]);
cache_get_value_int(loaded, "money", pInfo[playerid][pMoney]);
cache_get_value_float(loaded, "x", pInfo[playerid][X_Pos]);
cache_get_value_float(loaded, "y", pInfo[playerid][Y_Pos]);
cache_get_value_float(loaded, "z", pInfo[playerid][Z_Pos]);
cache_get_value_float(loaded, "angle", pInfo[playerid][A_Pos]);
cache_get_value_int(loaded, "interior", pInfo[playerid][pInterior]);
loaded++;
}
}
GivePlayerMoney(playerid, pInfo[playerid][pMoney]);
return 1;
}