R34 warnings in mysql_log (no active cache) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: R34 warnings in mysql_log (no active cache) (
/showthread.php?tid=598982)
R34 warnings in mysql_log (no active cache) -
rOps - 19.01.2016
Hi all, I'm trying to rewrite my MySQL version from R6 to R34, but in mysql_log I found a lot of warnings. I tryied to ****** it, but it's nonsense.
Код HTML:
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:08] [WARNING] cache_get_row_count - no active cache
[20:39:30] [WARNING] cache_get_row_count - no active cache
[20:39:41] [WARNING] cache_get_row_count - no active cache
[20:39:41] [WARNING] cache_get_field_count - no active cache
[20:40:19] [WARNING] cache_get_row_count - no active cache
[20:40:19] [WARNING] cache_get_row_count - no active cache
[20:40:29] [WARNING] cache_get_row_count - no active cache
[20:40:29] [WARNING] cache_get_field_count - no active cache
Maybe problem is in this code?
Код HTML:
stock LoadPlayerData(playerid)
{
if(!IsPlayerConnected(playerid)) return 1;
new Float: P_Pos[3], Query[200];
format(Query, sizeof(Query), "SELECT * FROM `players` WHERE `Vardas` = '%s'", GetPlayerNameEx(playerid));
new Cache:data = mysql_query(DB, Query);
if(mysql_num_rows() != 0)
{
SetPlayerVirtualWorld(playerid, cache_get_field_content_int(playerid, "World"));
SetPlayerInterior(playerid, cache_get_field_content_int(playerid, "Interior"));
SetPlayerDrunkLevel(playerid, cache_get_field_content_int(playerid, "Girtumas"));
SetPlayerMoneyA(playerid, cache_get_field_content_int(playerid, "MoneyPocket"));
PlayerInfo[playerid][Ieskomas] = cache_get_field_content_int(playerid, "Wanted");
PlayerInfo[playerid][Experience] = cache_get_field_content_int(playerid, "Xp");
PlayerInfo[playerid][AdminLevel] = cache_get_field_content_int(playerid, "Admin");
P_Pos[0] = cache_get_field_content_float(playerid, "pos_X");
P_Pos[1] = cache_get_field_content_float(playerid, "pos_Y");
P_Pos[2] = cache_get_field_content_float(playerid, "pos_Z");
SetPlayerScore (playerid, PlayerInfo[playerid][Experience]);
SetPlayerPos (playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
}
cache_delete(data);
return 1;
}
Re: R34 warnings in mysql_log (no active cache) -
Marcuse - 19.01.2016
Could you try:
PHP код:
stock LoadPlayerData(playerid)
{
if(!IsPlayerConnected(playerid)) return 1;
new Query[200];
mysql_format(DB, Query, sizeof(Query), "SELECT * FROM `players` WHERE `Vardas` = '%s'", GetPlayerNameEx(playerid));
mysql_tquery(DB, Query, "OnPlayerLoad", "i", playerid);
return 1;
}
forward OnPlayerLoad(playerid);
public OnPlayerLoad(playerid){
new
rows,
fields,
Float: P_Pos[3];
cache_get_data(rows, fields, con);
if(rows){
SetPlayerVirtualWorld(playerid, cache_get_field_content_int(0, "World"));
SetPlayerInterior(playerid, cache_get_field_content_int(0, "Interior"));
SetPlayerDrunkLevel(playerid, cache_get_field_content_int(0, "Girtumas"));
SetPlayerMoneyA(playerid, cache_get_field_content_int(0, "MoneyPocket"));
PlayerInfo[playerid][Ieskomas] = cache_get_field_content_int(0, "Wanted");
PlayerInfo[playerid][Experience] = cache_get_field_content_int(0, "Xp");
PlayerInfo[playerid][AdminLevel] = cache_get_field_content_int(0, "Admin");
P_Pos[0] = cache_get_field_content_float(0, "pos_X");
P_Pos[1] = cache_get_field_content_float(0, "pos_Y");
P_Pos[2] = cache_get_field_content_float(0, "pos_Z");
SetPlayerScore(playerid, PlayerInfo[playerid][Experience]);
SetPlayerPos(playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
}
return true;
}
Btw sorry if a made a typo somewhere, I'm on my tablet lol
Re: R34 warnings in mysql_log (no active cache) -
rOps - 19.01.2016
still same sh*t
Код HTML:
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:27] [WARNING] cache_get_row_count - no active cache
[14:17:47] [WARNING] cache_get_row_count - no active cache