• Уважаемый Гость.
    - Прежде чем создать свою тему, пожалуйста, попробуй воспользоваться этим -> ПОИСКОМ !!!
    - После решения Вашего вопроса (проблемы) - нажмите "Лучший ответ", на сообщении, которое его решило. За игнорирование этого действия - Вы получите соответствующее предупреждение. Мы - стараемся Вам помочь. Уделите 10 секунд - чтобы нажать кнопку. (Если у Вас нет такой возможности - укажите в последнем своем сообщении какой ответ Вы считаете лучшим. Наши модераторы сделают это за Вас)
    ЗАПРЕЩЕНО:
    - Cоздавать темы с названиями "Помогите", "Плиз", "Ошибка", "Не могу найти", "Хелп" и тому подобное;
    - Cоздавать темы без детального описания того, что нужно исправить.
    - Cоздавать темы из одного скриншота.
    За игнор правил форума - Ваша тема будет удалена, а Вы получите системное предупреждение.

Проблемы с бд помогите пожалуйста

Статус
В этой теме нельзя размещать новые ответы.

Hirukoo

Нуль
Регистрация
4 Июн 2018
Сообщения
5
Лучшие ответы
0
Репутация
0
если запускаю не через хостинг все нормально сохраняет но как только запускаю на хосте (Убунту) акаунты не сохраняются помогите что делать ?


Код ошибок MySQL
PHP:
[13:57:50] [ERROR] error #1054 while executing query "UPDATE `farm` SET `baOwned` = '0', `baOwner` = '', `baZarp` = '10', `baProd` = '1', `baSclad` = '23', `baBank` = '151424' WHERE `baID` = '0'": Unknown column 'baOwner' in 'field list' (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:27488 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:5471 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:23813 -> C:\Users\i7\Desktop\exployer\1231313\samp03\pawno\include\buttons.inc:213)
[13:57:50] [ERROR] error #1054 while executing query "UPDATE `farm` SET `baOwned` = '0', `baOwner` = '', `baZarp` = '7', `baProd` = '10', `baSclad` = '0', `baBank` = '370493' WHERE `baID` = '0'": Unknown column 'baOwner' in 'field list' (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:27488 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:5471 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:23813 -> C:\Users\i7\Desktop\exployer\1231313\samp03\pawno\include\buttons.inc:213)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baID' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41102)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baOwned' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41103)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baCash' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41104)
[13:57:52] [ERROR] cache_get_value_name: field 'baOwner' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41105)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baClass' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41106)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baEntrancex' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41111)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baEntrancey' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41112)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baEntrancez' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41113)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baExitx' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41114)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baExity' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41115)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baExitz' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41116)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baID' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41102)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baOwned' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41103)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baCash' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41104)
[13:57:52] [ERROR] cache_get_value_name: field 'baOwner' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41105)
[13:57:52] [ERROR] cache_get_value_name_int: field 'baClass' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41106)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baEntrancex' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41111)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baEntrancey' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41112)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baEntrancez' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41113)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baExitx' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41114)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baExity' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41115)
[13:57:52] [ERROR] cache_get_value_name_float: field 'baExitz' not found (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:41116)[/SPOILER]
[14:00:00] [ERROR] error #1054 while executing query "UPDATE `farm` SET `baOwned` = '0', `baOwner` = '', `baZarp` = '10', `baProd` = '1', `baSclad` = '23', `baBank` = '151424' WHERE `baID` = '0'": Unknown column 'baOwner' in 'field list' (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:27488 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:24341 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:23034)
[14:00:00] [ERROR] error #1054 while executing query "UPDATE `farm` SET `baOwned` = '0', `baOwner` = '', `baZarp` = '7', `baProd` = '10', `baSclad` = '0', `baBank` = '370493' WHERE `baID` = '0'": Unknown column 'baOwner' in 'field list' (C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:27488 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:24341 -> C:\Users\i7\Desktop\exployer\1231313\samp03\gamemodes\RRP.pwn:23034)


Коды с мода
PHP:
stock SaveFarm(he)
{
	new str[600];
    format(str, sizeof(str), "UPDATE `farm` SET `baOwned` = '%i', `baOwner` = '%s', `baZarp` = '%i', `baProd` = '%i', `baSclad` = '%i', `baBank` = '%i' WHERE `baID` = '%i'",
	FarmInfo[he][baOwned], FarmInfo[he][fOwner], FarmInfo[he][baZarp], FarmInfo[he][baProd], FarmInfo[he][baSclad], FarmInfo[he][baBank], FarmInfo[he][baID]);
    //mysql_tquery(str, -1, 0, connects);
    mysql_tquery(database, str, "","");//himiko 廛矮魏
    return true;
}

/////////////////////////////////////////////////

stock PayDay()
{
	new _n;
	LottoTimer = 0;
	new string[100];
	for(new h = 1; h < house_c+1; h++)
	{
		sscanf(HouseInfo[h][hOwner],"u",_n);
		if(IsPlayerConnected(_n) == 1 && HouseInfo[h][hOwned] == 1)
		{
			HouseInfo[h][hTakings] -= 300;
		}
		if(HouseInfo[h][hTakings] <= 0 && HouseInfo[h][hOwned] == 1)
		{
			new housecash = HouseInfo[h][hValue];
			format(string,sizeof(string),"UPDATE `users` SET `pHouseKey`='0',`pBank`='%d',`pText`='1' WHERE `Name`='%s' LIMIT 1",housecash,HouseInfo[h][hOwner]);
			mysql_tquery(database,string,"","");
			HouseInfo[h][hLock] = 1;
			HouseInfo[h][hOwned] = 0;
			format(HouseInfo[h][hOwner],5,"None");
		}
	}
	for(new b = 0; b < bizz_c; b++)
	{
		if(BizzInfo[b][bMafia]) FracInfo[BizzInfo[b][bMafia]][fBank] += 500;
	}
	for(new i;i < MAX_MUSORS; i ++)
	{
	    if(MusorCount[i] < 100)
	    {
			MusorCount[i] +=20;
			format(string, sizeof(string), "행藎槍孼? %d/100%", MusorCount[i]);
			UpdateDynamic3DTextLabelText(MusorText[i], 0xAFAFAFFF, string);
		}
	}
	for(new b = 0; b < sbizz_c; b++)
	{
		if(SBizzInfo[b][sbMafia]) FracInfo[SBizzInfo[b][sbMafia]][fBank] += 1500;
	}
	for(new b = 0; b < mbizz_c; b++)
	{
		if(MBizzInfo[b][mbOwned] == 1)
		{
			MBizzInfo[b][mbTill] -= 5000;
			banksf += 500;
			MBizzInfo[b][m2bTill] = 0;
			new rand = 18000 + random(4000);
			MBizzInfo[b][mbTill] += rand;
			MBizzInfo[b][m2bTill] = rand;

		}
	}
	foreach(new i:Player)
	{
		PayDayForPlayer(i);
		SavePlayer(i);
	}
	PayZone();
	new cena = 200;
	if(BallasNum > 0)
	{
		format(string, sizeof(string), "?循袍?蓀庄?%d 吾? 循胞 蓀庄?禎懿妬奄 $%d 裔 蓴?裔騶成孼裝?吾裝", PayBallas, PayBallas * cena);
		SendFamilyMessage(F_BALLAS,COLOR_GREEN, string);
		FracInfo[F_BALLAS][fBank] += PayBallas * cena;
	}
	if(VagosNum > 0)
	{
		format(string, sizeof(string), "?循袍?蓀庄?%d 吾? 循胞 蓀庄?禎懿妬奄 $%d 裔 蓴?裔騶成孼裝?吾裝", PayVagos, PayVagos * cena);
		SendFamilyMessage(F_VAGOS,COLOR_GREEN, string);
		FracInfo[F_VAGOS][fBank] += PayVagos * cena;
	}
	if(GroveNum > 0)
	{
		format(string, sizeof(string), "?循袍?蓀庄?%d 吾? 循胞 蓀庄?禎懿妬奄 $%d 裔 蓴?裔騶成孼裝?吾裝", PayGrove, PayGrove * cena);
		SendFamilyMessage(F_GROOVE,COLOR_GREEN, string);
		FracInfo[F_GROOVE][fBank] += PayGrove * cena;
 	}
	if(AztekNum > 0)
	{
		format(string, sizeof(string), "?循袍?蓀庄?%d 吾? 循胞 蓀庄?禎懿妬奄 $%d 裔 蓴?裔騶成孼裝?吾裝", PayAztek, PayAztek * cena);
		SendFamilyMessage(F_AZTEC,COLOR_GREEN, string);
		FracInfo[F_AZTEC][fBank] += PayAztek * cena;
	}
	if(RifaNum > 0)
	{
		format(string, sizeof(string), "?循袍?蓀庄?%d 吾? 循胞 蓀庄?禎懿妬奄 $%d 裔 蓴?裔騶成孼裝?吾裝", PayRifa, PayRifa * cena);
		SendFamilyMessage(F_RIFA,COLOR_GREEN, string);
		FracInfo[F_RIFA][fBank] += PayRifa * cena;
	}
	BallasNum = VagosNum = GroveNum = AztekNum = RifaNum = 0;
	for(new i = 0; i < sizeof(allowedfactions); i++) UpdateObwag(allowedfactions[i]);
	for(new i = 0; i < sizeof(allowedmfactions); i++) UpdateObwag(allowedmfactions[i]);
	for(new i = 1; i < house_c+1; i++) SaveHouse(i);
	for(new i = 0; i < sizeof(FarmInfo); i++) SaveFarm(i); //himiko 廛僚獪?
	SaveRepa(),SaveBankFrac(),
	SaveBizz(),SaveSBizz(),SaveMBizz();
	return 1;
}
/////////////////
void LoadFarm() // 渟釣橓?壯 41-2, 穽荻儼?壯 調灑桎楫前翟狀增?
{
    new str[256];
	new rows,time = GetTickCount();
	cache_get_row_count(rows);
	if(rows)
	{
		for(new he = 0; he < rows; he++)
		{
			cache_get_value_name_int(he,"baID",FarmInfo[he][baID]);
			cache_get_value_name_int(he,"baOwned",FarmInfo[he][baOwned]);
			cache_get_value_name_int(he,"baCash",FarmInfo[he][baCash]);
			cache_get_value_name(he,"baOwner", FarmInfo[he][fOwner], MAX_PLAYER_NAME);
			cache_get_value_name_int(he,"baClass",FarmInfo[he][baClass]);
			cache_get_value_name_int(he,"baZarp",FarmInfo[he][baZarp]);
			cache_get_value_name_int(he,"baProd",FarmInfo[he][baProd]);
			cache_get_value_name_int(he,"baSclad",FarmInfo[he][baSclad]);
			cache_get_value_name_int(he,"babank",FarmInfo[he][baBank]);
			cache_get_value_name_float(he,"baEntrancex",FarmInfo[he][baEntrancex]);
			cache_get_value_name_float(he,"baEntrancey",FarmInfo[he][baEntrancey]);
			cache_get_value_name_float(he,"baEntrancez",FarmInfo[he][baEntrancez]);
			cache_get_value_name_float(he,"baExitx",FarmInfo[he][baExitx]);
			cache_get_value_name_float(he,"baExity",FarmInfo[he][baExity]);
			cache_get_value_name_float(he,"baExitz",FarmInfo[he][baExitz]);
            cache_get_value_name_float(he,"baAmbarx",FarmInfo[he][baAmbarx]);
            cache_get_value_name_float(he,"baAmbary",FarmInfo[he][baAmbary]);
            cache_get_value_name_float(he,"baAmbarz",FarmInfo[he][baAmbarz]);
			if(FarmInfo[he][baOwned] == 0)
			{
				if(FarmInfo[he][baClass] == 0) format(str, sizeof(str), "---= [ 塞依杷? 輒鏃?] =---\n鸞迪溢增? {00FF00}$%i", FarmInfo[he][baCash]);
			}
			if(FarmInfo[he][baOwned] == 1)
			{
				if(FarmInfo[he][baClass] == 0) format(str, sizeof(str), "---= [ 塞依杷? 輒鏃?] =---\n\n쯤雪言業: %s\n厥賊剡?債跡?: {00FF00}$%i{FFFFFF}\n행卒乙診 調灑婆? {00FF00}$%i{FFFFFF} 裔 鴨釣脣", FarmInfo[he][fOwner], FarmInfo[he][baProd], FarmInfo[he][baZarp]);
			}
			FarmInfo[he][baLabel] = Create3DTextLabel(str, 0xFFFFFFFF, FarmInfo[he][baEntrancex], FarmInfo[he][baEntrancey], FarmInfo[he][baEntrancez]+0.90, 10.0, 0, 1);
            format(str, sizeof(str), "到跡? ?閃蓀釣 %i / 10000 抑\n{FFFFFF}쾰 裔藎滄孺 禎茁臣贍獲?'H'", FarmInfo[he][baSclad]);
			FarmInfo[he][baLabel2] = Create3DTextLabel(str, 16711935, FarmInfo[he][baAmbarx], FarmInfo[he][baAmbary], FarmInfo[he][baAmbarz], 10.0, 0, 1);
			FarmInfo[he][baPick] = CreatePickup(19132, 23, FarmInfo[he][baEntrancex], FarmInfo[he][baEntrancey], FarmInfo[he][baEntrancez],-1);
            CreateDynamicMapIcon(FarmInfo[he][baEntrancex], FarmInfo[he][baEntrancey], FarmInfo[he][baEntrancez], 56, 0);
			TotalFarm++;
		}
	}
	printf("  Load Frams: 		%d	(ms: %d)", TotalFarm,GetTickCount() - time);
	return true;
}


////////////////////////////////////

public OnGameModeExit()
{
    foreach(new i:Player) SavePlayer(i);
	mysql_tquery(database,"UPDATE `users` SET `onstatus`='0'", "", "");
	mysql_tquery(database,"DELETE FROM `banlog` WHERE `unban_date` < NOW()","","");
	foreach(new i:Player) SavePlayer(i);
	SaveServer();
	UnloadContent();
	mysql_close(database);
	return 1;
}

/////////////////////////////////
stock SaveServer()
{
	for(new i = 0; i < cars_c; i++) SaveBuyableCars(i);
	vScooter(i)
	{
		if(vType[i] != 1) continue;
		format(bigstr,sizeof(bigstr),"UPDATE `fracveh` SET `probeg` = '%f',`fuel` = '%f' WHERE `id` = '%d'",vProbeg[i],uFuel[i],fCarInfo[i][mID]);
		mysql_tquery(database, bigstr, "", "");
	}
	for(new i = 1; i < house_c+1; i++) SaveHouse(i);
	for(new i = 0; i < sizeof(FarmInfo); i++) SaveFarm(i);
	SaveOther(),SaveRabota(),SaveGZ(),SaveMembersFrac(),SaveMBizz(),SaveBizz(),SaveSBizz(),SaveBankFrac();
	return SaveBankFrac(),SaveRepa(),SaveKazino();
}
////////////////////////////////////////
 
Последнее редактирование модератором:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу