Перейти к содержанию
Авторизация  
FOCU5

Mysql Кеширование

Рекомендуемые сообщения

FOCU5

Ошибки.

Вроде как раньше была версия мускула другая, теперь р39-2, появились ошибки, может кто поможет поправить. Если что заплачу

[21:57:22] [WARNING] cache_get_row_count - no active cache
[22:01:30] [WARNING] cache_get_row_count - no active cache
[22:03:25] [WARNING] cache_get_row_count - no active cache

Строки

function OnPlayerExistCheck(playerid)
{
	if(cache_get_row_count(g_ch))
	{
		gPlayerAccount[playerid] = 1;
		new loginmsg[256+1];
		format(loginmsg,256,"{ffffff}Добро пожаловать на проект{1E90FF} TANKOGRAD - RP Русский город в Samp\n\
		{ffffff}Данный аккаунт уже прошел регистрацию!\n\
		{ffffff}Ваш Пинг: {daa520}%d\n\
		{FFA1A1} Не в коем случаи НЕ СТАВЬТЕ ПАРОЛЬ , как на другом проекте!\n\
		{ffffff}Введите ваш пароль:",GetPlayerPing(playerid));
		ShowPlayerDialog(playerid,164,DIALOG_STYLE_INPUT,"{FFFFFF}Авторизация",loginmsg,"Ок","Отмена");
	}
	else
	{
		gPlayerAccount[playerid] = 0;
		new loginmsg[256+1];
		format(loginmsg,256,"{ffffff}Добро пожаловать на сервер{1E90FF} TANKOGRAD - RP Русский город в samp\n\
		{ffffff}Этот аккаунт не зарегистрирован.\n\
		{ffffff}Введите пароль и нажмите \"Далее\".\n\
		{ffffff}Примечания:\n- Пароль чувствителен к регистру.\n\
		{ffffff}- В пароле можно использовать латинские символы.\n\
		{FFA1A1} Не в коем случаи НЕ СТАВЬТЕ ПАРОЛЬ , как на другом проекте!");
		ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"{FFFFFF}Регистрация",loginmsg,"Далее","Отмена");
	}
	return 1;
}
public LoadCar()
{
	new rows = cache_get_row_count(g_ch);
	new carid;
	for(new i = 0; i < rows; i++)
	{
		if(i+1 >= sizeof(CarInfo))
		{
			print("Warning in public LoadCar(): row_count > sizeof(CarInfo)");
			break;
		}
		CarInfo[i+1][cOwned] = cache_get_field_content_int(i, "owned", g_ch);
		CarInfo[i+1][cModel] = cache_get_field_content_int(i, "model", g_ch);
		CarInfo[i+1][cSLocationx] = cache_get_field_content_float(i, "slocationx", g_ch);
		CarInfo[i+1][cSLocationy] = cache_get_field_content_float(i, "slocationy", g_ch);
		CarInfo[i+1][cSLocationz] = cache_get_field_content_float(i, "slocationz", g_ch);
		CarInfo[i+1][cSAngle] = cache_get_field_content_float(i, "sangle", g_ch);
		CarInfo[i+1][cLocationx] = cache_get_field_content_float(i, "locationx", g_ch);
		CarInfo[i+1][cLocationy] = cache_get_field_content_float(i, "locationy", g_ch);
		CarInfo[i+1][cLocationz] = cache_get_field_content_float(i, "locationz", g_ch);
		CarInfo[i+1][cAngle] = cache_get_field_content_float(i, "angle", g_ch);
		CarInfo[i+1][cProbeg] = cache_get_field_content_float(i, "probeg", g_ch);
		CarInfo[i+1][cColor1] = cache_get_field_content_int(i, "color1", g_ch);
		CarInfo[i+1][cColor2] = cache_get_field_content_int(i, "color2", g_ch);
		CarInfo[i+1][cPrice] = cache_get_field_content_int(i, "price", g_ch);
		CarInfo[i+1][cWheels] = cache_get_field_content_int(i, "wheels", g_ch);
		CarInfo[i+1][cNitro] = cache_get_field_content_int(i, "nitro", g_ch);
		CarInfo[i+1][cCDLock] = cache_get_field_content_int(i, "cdlock", g_ch);
		CarInfo[i+1][cGPS] = cache_get_field_content_int(i, "gps", g_ch);
		CarInfo[i+1][cThief] = cache_get_field_content_int(i, "thief", g_ch);
		cache_get_field_content(i, "lastname", CarInfo[i+1][cLastName], g_ch, MAX_PLAYER_NAME);
		CarInfo[i+1][cSpoiler] = cache_get_field_content_int(i, "spoiler", g_ch);
		CarInfo[i+1][cHoods] = cache_get_field_content_int(i, "hoods", g_ch);
		CarInfo[i+1][cRoof] = cache_get_field_content_int(i, "roof", g_ch);
		CarInfo[i+1][cSideskirt] = cache_get_field_content_int(i, "sideskirt", g_ch);
		CarInfo[i+1][cLamps] = cache_get_field_content_int(i, "lamps", g_ch);
		CarInfo[i+1][cExhaust] = cache_get_field_content_int(i, "exhaust", g_ch);
		CarInfo[i+1][cStereo] = cache_get_field_content_int(i, "stereo", g_ch);
		CarInfo[i+1][cHydravlic] = cache_get_field_content_int(i, "hydravlic", g_ch);
		CarInfo[i+1][cFrontBumper] = cache_get_field_content_int(i, "frontbumper", g_ch);
		CarInfo[i+1][cRearBumper] = cache_get_field_content_int(i, "rearbumper", g_ch);
		CarInfo[i+1][cPaint] = cache_get_field_content_int(i, "paint", g_ch);
		CarInfo[i+1][cVents] = cache_get_field_content_int(i, "vents", g_ch);
		CarInfo[i+1][cAlarm] = cache_get_field_content_int(i, "alarm", g_ch);
		CarInfo[i+1][cParked] = cache_get_field_content_int(i, "parked", g_ch);
public OnPlayerLogin(playerid,password[])
{
	if(cache_get_row_count(g_ch))
	{
		cache_get_field_content(0, "password", PlayerInfo[playerid][pKey], g_ch, 128);
		PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0, "level", g_ch);
		PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "admin", g_ch);
		PlayerInfo[playerid][pDonateMoney1] = cache_get_field_content_int(0, "donatemoney1", g_ch);
		PlayerInfo[playerid][pVipStatus] = cache_get_field_content_int(0, "vipstatus", g_ch);
		PlayerInfo[playerid][pDonateRank] = cache_get_field_content_int(0, "donaterank", g_ch);
		PlayerInfo[playerid][gPupgrade] = cache_get_field_content_int(0, "pupgrade", g_ch);
		PlayerInfo[playerid][pConnectTime] = cache_get_field_content_int(0, "connecttime", g_ch);
		PlayerInfo[playerid][pSpawn] = cache_get_field_content_int(0, "spawn", g_ch);
		PlayerInfo[playerid][pReg] = cache_get_field_content_int(0, "reg", g_ch);
		PlayerInfo[playerid][pSex] = cache_get_field_content_int(0, "sex", g_ch);
		PlayerInfo[playerid][pAge] = cache_get_field_content_int(0, "age", g_ch);
		PlayerInfo[playerid][pOrigin] = cache_get_field_content_int(0, "origin", g_ch);
		PlayerInfo[playerid][pCK] = cache_get_field_content_int(0, "ck", g_ch);
		PlayerInfo[playerid][pMuted] = cache_get_field_content_int(0, "muted", g_ch);
		PlayerInfo[playerid][pMutedTime] = cache_get_field_content_int(0, "mutedtime", g_ch);
		PlayerInfo[playerid][pExp] = cache_get_field_content_int(0, "exp", g_ch);
		PlayerInfo[playerid][pCash] = cache_get_field_content_int(0, "cash", g_ch);
		PlayerInfo[playerid][pAccount] = cache_get_field_content_int(0, "account", g_ch);
		PlayerInfo[playerid][pCrimes] = cache_get_field_content_int(0, "crimes", g_ch);
		PlayerInfo[playerid][pKills] = cache_get_field_content_int(0, "kills", g_ch);
		PlayerInfo[playerid][pDeaths] = cache_get_field_content_int(0, "deaths", g_ch);
		PlayerInfo[playerid][pArrested] = cache_get_field_content_int(0, "arrested", g_ch);
		PlayerInfo[playerid][pWantedDeaths] = cache_get_field_content_int(0, "wanteddeaths", g_ch);
		PlayerInfo[playerid][pPhoneBook] = cache_get_field_content_int(0, "phonebook", g_ch);
		PlayerInfo[playerid][pJob] = cache_get_field_content_int(0, "job", g_ch);
		PlayerInfo[playerid][pPayCheck] = cache_get_field_content_int(0, "paycheck", g_ch);
		PlayerInfo[playerid][pHeadValue] = cache_get_field_content_int(0, "headvalue", g_ch);
		PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0, "jailed", g_ch);
		PlayerInfo[playerid][pJailTime] = cache_get_field_content_int(0, "jailtime", g_ch);
		PlayerInfo[playerid][pMats] = cache_get_field_content_int(0, "mats", g_ch);
		PlayerInfo[playerid][pDrugs] = cache_get_field_content_int(0, "drugs", g_ch);
		PlayerInfo[playerid][pSigs] = cache_get_field_content_int(0, "sigs", g_ch);
		PlayerInfo[playerid][pCar] = cache_get_field_content_int(0, "car", g_ch);
		PlayerInfo[playerid][pCar2] = cache_get_field_content_int(0, "car2", g_ch);
		PlayerInfo[playerid][pMobila] = cache_get_field_content_int(0, "mobila", g_ch);
		PlayerInfo[playerid][pRadio] = cache_get_field_content_int(0, "radio", g_ch);
		PlayerInfo[playerid][pVendetta] = cache_get_field_content_int(0, "vendetta", g_ch);
		PlayerInfo[playerid][pNark] = cache_get_field_content_int(0, "nark", g_ch);
		PlayerInfo[playerid][pWanted] = cache_get_field_content_int(0, "wanted", g_ch);
		PlayerInfo[playerid][pCash] = cache_get_field_content_int(0, "babki", g_ch);
		PlayerInfo[playerid][pWhiskey] = cache_get_field_content_int(0, "whiskey", g_ch);
		PlayerInfo[playerid][pInvWeapon] = cache_get_field_content_int(0, "invweapon", g_ch);
		PlayerInfo[playerid][pInvAmmo] = cache_get_field_content_int(0, "invammo", g_ch);
		PlayerInfo[playerid][pInvWeapon2] = cache_get_field_content_int(0, "invweapon2", g_ch);
		PlayerInfo[playerid][pInvAmmo2] = cache_get_field_content_int(0, "invammo2", g_ch);
		PlayerInfo[playerid][pInvWeapon3] = cache_get_field_content_int(0, "invweapon3", g_ch);
		PlayerInfo[playerid][pInvAmmo3] = cache_get_field_content_int(0, "invammo3", g_ch);
		PlayerInfo[playerid][pAptechka] = cache_get_field_content_int(0, "aptechka", g_ch);
		PlayerInfo[playerid][pWeapon] = cache_get_field_content_int(0, "weapon", g_ch);
		PlayerInfo[playerid][pLeader] = cache_get_field_content_int(0, "leader", g_ch);
		PlayerInfo[playerid][pMember] = cache_get_field_content_int(0, "member", g_ch);
		PlayerInfo[playerid][pRank] = cache_get_field_content_int(0, "rank", g_ch);
		PlayerInfo[playerid][pChar] = cache_get_field_content_int(0, "char", g_ch);
		PlayerInfo[playerid][pContractTime] = cache_get_field_content_int(0, "contracttime", g_ch);
		PlayerInfo[playerid][pBarigaTime] = cache_get_field_content_int(0, "barigatime", g_ch);
		PlayerInfo[playerid][pDetSkill] = cache_get_field_content_int(0, "detskill", g_ch);
		PlayerInfo[playerid][pSexSkill] = cache_get_field_content_int(0, "sexskill", g_ch);
		PlayerInfo[playerid][pLawSkill] = cache_get_field_content_int(0, "lawskill", g_ch);
		PlayerInfo[playerid][pMechSkill] = cache_get_field_content_int(0, "mechskill", g_ch);
		PlayerInfo[playerid][pJackSkill] = cache_get_field_content_int(0, "jackskill", g_ch);
		PlayerInfo[playerid][pCarSkill] = cache_get_field_content_int(0, "carskill", g_ch);
		PlayerInfo[playerid][pNewsSkill] = cache_get_field_content_int(0, "newsskill", g_ch);
		PlayerInfo[playerid][pDrugsSkill] = cache_get_field_content_int(0, "drugsskill", g_ch);
		PlayerInfo[playerid][pCookSkill] = cache_get_field_content_int(0, "cookskill", g_ch);
		PlayerInfo[playerid][pThiefSkill] = cache_get_field_content_int(0, "thiefskill", g_ch);
		PlayerInfo[playerid][pSHealth] = cache_get_field_content_float(0, "shealth", g_ch);
		PlayerInfo[playerid][pHealth] = cache_get_field_content_float(0, "health", g_ch);
		PlayerInfo[playerid][pInt] = cache_get_field_content_int(0, "int", g_ch);
		PlayerInfo[playerid][pLocal] = cache_get_field_content_int(0, "local", g_ch);
		PlayerInfo[playerid][pTeam] = cache_get_field_content_int(0, "team", g_ch);
		PlayerInfo[playerid][pModel] = cache_get_field_content_int(0, "model", g_ch);
		PlayerInfo[playerid][pPnumber] = cache_get_field_content_int(0, "pnumber", g_ch);
		PlayerInfo[playerid][pPhousekey] = cache_get_field_content_int(0, "phousekey", g_ch);
		PlayerInfo[playerid][pPbiskey] = cache_get_field_content_int(0, "pbiskey", g_ch);
		PlayerInfo[playerid][pPos_x] = cache_get_field_content_float(0, "pos_x", g_ch);
		PlayerInfo[playerid][pPos_y] = cache_get_field_content_float(0, "pos_y", g_ch);
		PlayerInfo[playerid][pPos_z] = cache_get_field_content_float(0, "pos_z", g_ch);
		PlayerInfo[playerid][pCarLic] = cache_get_field_content_int(0, "carlic", g_ch);
		PlayerInfo[playerid][pFlyLic] = cache_get_field_content_int(0, "flylic", g_ch);
		PlayerInfo[playerid][pBoatLic] = cache_get_field_content_int(0, "boatlic", g_ch);
		PlayerInfo[playerid][pGunLic] = cache_get_field_content_int(0, "gunlic", g_ch);
		PlayerInfo[playerid][pVerevka] = cache_get_field_content_int(0, "verevka", g_ch);
		PlayerInfo[playerid][pBrasleti] = cache_get_field_content_int(0, "brasleti", g_ch);
		PlayerInfo[playerid][pCarTime] = cache_get_field_content_int(0, "cartime", g_ch);
		PlayerInfo[playerid][pPayDay] = cache_get_field_content_int(0, "payday", g_ch);
		PlayerInfo[playerid][pPayDayHad] = cache_get_field_content_int(0, "paydayhad", g_ch);
		PlayerInfo[playerid][pWins] = cache_get_field_content_int(0, "wins", g_ch);
		PlayerInfo[playerid][pLoses] = cache_get_field_content_int(0, "loses", g_ch);
		PlayerInfo[playerid][pAlcoholPerk] = cache_get_field_content_int(0, "alcoholperk", g_ch);
		PlayerInfo[playerid][pDrugPerk] = cache_get_field_content_int(0, "drugperk", g_ch);
		PlayerInfo[playerid][pMiserPerk] = cache_get_field_content_int(0, "miserperk", g_ch);
		PlayerInfo[playerid][pPainPerk] = cache_get_field_content_int(0, "painperk", g_ch);
		PlayerInfo[playerid][pTraderPerk] = cache_get_field_content_int(0, "traderperk", g_ch);
		PlayerInfo[playerid][pTut] = cache_get_field_content_int(0, "tut", g_ch);
		PlayerInfo[playerid][pMissionNr] = cache_get_field_content_int(0, "missionnr", g_ch);
		PlayerInfo[playerid][pWarns] = cache_get_field_content_int(0, "warns", g_ch);
		PlayerInfo[playerid][pAdjustable] = cache_get_field_content_int(0, "adjustable", g_ch);
		PlayerInfo[playerid][pFuel] = cache_get_field_content_int(0, "fuel", g_ch);
		PlayerInfo[playerid][pPos_x] = cache_get_field_content_float(0, "pos_x", g_ch);
		PlayerInfo[playerid][pDead] = cache_get_field_content_int(0, "dead", g_ch);
		PlayerInfo[playerid][pMarried] = cache_get_field_content_int(0, "married", g_ch);
		cache_get_field_content(0, "marriedto", PlayerInfo[playerid][pMarriedTo], g_ch, 128);
		cache_get_field_content(0, "adminname", PlayerInfo[playerid][pAdminName], g_ch, 128);
		PlayerInfo[playerid][pScaner] = cache_get_field_content_int(0, "scaner", g_ch);
		PlayerInfo[playerid][pMinFin] = cache_get_field_content_int(0, "minfin", g_ch);
		PlayerInfo[playerid][pGun1] = cache_get_field_content_int(0, "gun1", g_ch);
		PlayerInfo[playerid][pGun2] = cache_get_field_content_int(0, "gun2", g_ch);
		PlayerInfo[playerid][pGun3] = cache_get_field_content_int(0, "gun3", g_ch);
		PlayerInfo[playerid][pGun4] = cache_get_field_content_int(0, "gun4", g_ch);
		PlayerInfo[playerid][pGun5] = cache_get_field_content_int(0, "gun5", g_ch);
		PlayerInfo[playerid][pGun6] = cache_get_field_content_int(0, "gun6", g_ch);
		PlayerInfo[playerid][pAmmo2] = cache_get_field_content_int(0, "ammo2", g_ch);
		PlayerInfo[playerid][pAmmo3] = cache_get_field_content_int(0, "ammo3", g_ch);
		PlayerInfo[playerid][pAmmo4] = cache_get_field_content_int(0, "ammo4", g_ch);
		PlayerInfo[playerid][pAmmo5] = cache_get_field_content_int(0, "ammo5", g_ch);
		PlayerInfo[playerid][pAmmo6] = cache_get_field_content_int(0, "ammo6", g_ch);
		PlayerInfo[playerid][pBurger] = cache_get_field_content_int(0, "burger", g_ch);
		PlayerInfo[playerid][pBurger] = cache_get_field_content_int(0, "napitok", g_ch);
		PlayerInfo[playerid][pVw] = cache_get_field_content_int(0, "vw", g_ch);
		PlayerInfo[playerid][pAng] = cache_get_field_content_float(0, "ang", g_ch);
		PlayerInfo[playerid][pMedict] = cache_get_field_content_int(0, "medict", g_ch);
		PlayerInfo[playerid][pVoenBilet] = cache_get_field_content_int(0, "voenbilet", g_ch);
		PlayerInfo[playerid][pShtraf] = cache_get_field_content_int(0, "shtraf", g_ch);

		new str[128], name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, MAX_PLAYER_NAME);
		format(str, 128, "SELECT * FROM `houses` WHERE `Owner` = '%s'", name);
		mysql_tquery(g_ch, str, "OnPlayerHouseLoad", "d", playerid);
	}

forward OnPlayerHouseLoad(playerid);
public OnPlayerHouseLoad(playerid)
{
	if(cache_get_row_count(g_ch))
	{
		PlayerInfo[playerid][pPhousekey] = cache_get_field_content_int(0, "ID", g_ch);
		PlayerInfo[playerid][pSpawn] = 2;
		if(HouseInfo[PlayerInfo[playerid][pPhousekey]][hTakings]-2 <= getdate())
		{
			SendClientMessage(playerid, 0xFF9900AA, "Внимание! Срок оплаты Вашего дома подходит к концу");
		}
	}
	else PlayerInfo[playerid][pPhousekey] = -1;
	return OnPlayerLoginContinue(playerid);
}

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
FOCU5

Подниму!

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Гость
Эта тема закрыта для публикации ответов.
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×

Важная информация

Мы разместили cookie-файлы на ваше устройство, чтобы помочь сделать этот сайт лучше. Вы можете изменить свои настройки cookie-файлов, или продолжить без изменения настроек.