No active cache
#1

hello.
everytime i run this script:
pawn Код:
public OnPlayerConnect(playerid)
{
 //Login / Register
 new name[MAX_PLAYER_NAME],query2[128];
 GetPlayerName(playerid, name, sizeof(name));
 format(query2,sizeof(query2),"SELECT * FROM suspended WHERE username ='%s'",name);
 mysql_function_query(dbhandle,query2,true,"SuspendCheck","i",playerid);
 return 1;
}
forward SuspendCheck(playerid);
public SuspendCheck(playerid)
{
   new num_rows,num_fields;
   cache_get_data(num_rows,num_fields,dbhandle);
   if(num_rows==0)
   {
      new name[MAX_PLAYER_NAME],query[128],nome[ MAX_STRING ], playerserial[128],playerip[32];
 format(query,sizeof(query),"SELECT id FROM user WHERE username='%s'",name);
 mysql_function_query(dbhandle,query,true,"OnUserCheck","i",playerid);

    gpci(playerid,playerserial,sizeof(playerserial));
    GetPlayerIp(playerid,playerip,32);
    format( nome, sizeof(nome), "14[JOIN] %s[%d] has joined Syndicate Roleplay. (IP: %s) (GPCI: %s ) | Online: %d",PlayerName(playerid), playerid, playerip,playerserial, ConnectedPlayers());
    iEcho( nome );
    }
   else
   {
   SendClientMessage(playerid, -1,"You are banned from this server!");
   SetTimerEx("KickTimer", 100, 0, "i", playerid);
   }
   return 1;
}
public OnUserCheck(playerid)
{
   new num_rows,num_fields;
   cache_get_data(num_rows,num_fields,dbhandle);
   if(num_rows==0)
   {
   //register
   ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Register","Welcome!\nPlease enter a password register an account.","Confirm","Cancel");
             SetPlayerCameraPos(playerid, 1520.0544, -1724.8541, 36.9307);
    SetPlayerCameraLookAt(playerid, 1519.2086, -1725.3856, 36.6357);
   }
   else
   {
   //login
     ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Please enter your password","Confirm","Cancel");
                SetPlayerCameraPos(playerid, 1520.0544, -1724.8541, 36.9307);
    SetPlayerCameraLookAt(playerid, 1519.2086, -1725.3856, 36.6357);
   }
   return 1;
}
I get this error:
[18:02:13] [WARNING] cache_get_data - no active cache


Do i need to close the cache before i open another one?
if yes, how do i do that?


AND YES, i do use an older version of mysql, i just prefer this version.
Reply
#2

nobody an idea?
Reply
#3

someone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)