Question

Значит брал я мод с интернета *не буду говорить какой*, тестил я его и тут бабац, 1 ошибка была в логах *я её исправил*, и 2 ошибка при выходе с сервера. Ошибка была в SaveAcc, вот только как её решить я хер знает так как она очень огромного размера. *я думаю что в saveacc имеются лишние строки и их нужно найти, вот только я задолбался её искать и прошу помощи у вас :) ) ( Буду очень благодарен если вы поможете :bravo: )
Ошибка:

[12:16:21 07/20/20] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (Query: "UPDATE `accounts` SET ip='127.0.0.1',level=1,admin=7,sex=1,age=19,securitycode='0',model=14,memberskin=0,cash=10126000,bank=-600,mute=0,warn=0,leader=0,templeader=0,member=0,rank=0,exp=2,news=0,crimes=0,wanted=0,familyrank=0,wantedtime=0,wantedwho='',wantedreason='',jail=0,job=0,jailtime=0,checktime=1085,drugs=0,married=0,whomarried='',paycheck='0',charity='0',vip='0',viptime='0',time='2',fstyle='0',skin1='0',skin2='0',skin3='0',spawnchange='2',sdpistol='0',deserteagle='0',shotgun='0',mp5='0',ak47='0',m4='0',pistol='0',microuzi='0',sportexp='0',zakon='2',checkcode='0',city='0',bed='0',watch='0',ciggare='0',sprunk='7000',mask='0',phonebalance='0',aptechka='0',Voennik='0',music='0',datavhod='20.7.2020',phone='0, 0',repcar='0, 0',improves='0, 0, 0, 0',fishki='0',mats='0',phonenumber='0',phnumber1='0',phnumber2='490653',phnumber3='4',phnumber4='0',phnumber5='0',phnumber6='0',phnumber7='0',phnumber8='0',lwarn='0',family=0,familysozd=0,familyzam=0,black0='0',black1='0',black2='0',black3='0',black4='0',black5='0',l")

SaveAccount: (часть закомментированна т.к по моему мнению этого нету в сохранении и в ошибке)
 

Спойлер

stock SaveAccount(playerid)
{
	if(PlayerLogged[playerid] == false || IsPlayerConnected(playerid) == 0) return 1;
	new src[90], year, month, day;
	getdate(year, month, day);
	format(global_string,sizeof(global_string),"UPDATE "T_ACCOUNTS" SET ");
	format(src,sizeof(src),"ip='%s',",PI[playerid][pIP]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"level=%d,",PI[playerid][pLevel]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"admin=%d,",PI[playerid][pAdmin]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sex=%d,",PI[playerid][pSex]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"age=%d,",PI[playerid][pAge]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"securitycode='%i',",PI[playerid][pSecurityCode]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"model=%d,",PI[playerid][pModel]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"memberskin=%d,",PI[playerid][pMemberSkin]);
	strcat(global_string,src,sizeof(global_string));
	if(PI[playerid][pCash] < -1000000) PI[playerid][pCash] = BONUS_CASH;
	format(src,sizeof(src),"cash=%d,",PI[playerid][pCash]);
	strcat(global_string,src,sizeof(global_string));
	if(PI[playerid][pBank] < -1000000) PI[playerid][pBank] = 0;
	format(src,sizeof(src),"bank=%d,",PI[playerid][pBank]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mute=%d,",PI[playerid][pMuted]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"warn=%d,",PI[playerid][pWarn]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"leader=%d,",PI[playerid][pLeader]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"templeader=%d,",PI[playerid][pTempLeader]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"member=%d,",PI[playerid][pMember]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"rank=%d,",PI[playerid][pRank]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"exp=%d,",PI[playerid][pExp]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"news=%d,",PI[playerid][pNews]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"crimes=%d,",PI[playerid][pCrimes]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wanted=%d,",PI[playerid][pWanted]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"familyrank=%d,",PI[playerid][pFamilyRank]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wantedtime=%d,",PI[playerid][pWantedTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wantedwho='%s',",PI[playerid][pWantedWho]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wantedreason='%s',",PI[playerid][pWantedReason]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"jail=%d,",PI[playerid][pJail]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"job=%d,",PI[playerid][pJob]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"jailtime=%d,",PI[playerid][pJailTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"checktime=%d,",PI[playerid][pCheckTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"drugs=%d,",PI[playerid][pDrugs]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"married=%d,",PI[playerid][pMarried]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"whomarried='%s',",PI[playerid][pWhoMarried]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"paycheck='%i',",PI[playerid][pPayCheck]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"charity='%i',",PI[playerid][pCharity]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"vip='%i',",PI[playerid][pVip]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"viptime='%i',",PI[playerid][pVipTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"time='%i',",PI[playerid][pTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"fstyle='%i',",PI[playerid][pFightStyle]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"skin1='%i',",PI[playerid][pSkin][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"skin2='%i',",PI[playerid][pSkin][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"skin3='%i',",PI[playerid][pSkin][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"spawnchange='%i',",PI[playerid][pSpawnChange]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sdpistol='%i',",PI[playerid][pGunSkill][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"deserteagle='%i',",PI[playerid][pGunSkill][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"shotgun='%i',",PI[playerid][pGunSkill][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mp5='%i',",PI[playerid][pGunSkill][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"ak47='%i',",PI[playerid][pGunSkill][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"m4='%i',",PI[playerid][pGunSkill][5]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"pistol='%i',",PI[playerid][pGunSkill][6]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"microuzi='%i',",PI[playerid][pGunSkill][7]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sportexp='%i',",PI[playerid][pSportExp]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"zakon='%i',",PI[playerid][pZakon]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"checkcode='%i',",PI[playerid][pCheckCode]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"city='%i',",PI[playerid][pCity]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"bed='%i',",PI[playerid][pBed]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"watch='%i',",PI[playerid][pWatch]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"ciggare='%i',",PI[playerid][pCiggare]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sprunk='%i',",PI[playerid][pSprunk]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mask='%i',",PI[playerid][pMask]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phonebalance='%i',",PI[playerid][pPhoneBalance]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"aptechka='%i',",PI[playerid][pAptechka]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"Voennik='%i',",PI[playerid][pVoennik]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"music='%i',",PI[playerid][pMusic]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"datavhod='%d.%d.%d',",day, month, year);
	strcat(global_string,src,sizeof(global_string));
	format(PI[playerid][pPhones],16,"%i, %i",PI[playerid][pPhone][0],PI[playerid][pPhone][1]);
	format(src,sizeof(src),"phone='%s',",PI[playerid][pPhones]);
	strcat(global_string,src,sizeof(global_string));
	format(PI[playerid][pRepcars],16,"%i, %i",PI[playerid][pRepcar][0],PI[playerid][pRepcar][1]);
	format(src,sizeof(src),"repcar='%s',",PI[playerid][pRepcars]);
	strcat(global_string,src,sizeof(global_string));
	format(PI[playerid][pImproves],32,"%i, %i, %i, %i",PI[playerid][pImprove][0],PI[playerid][pImprove][1],PI[playerid][pImprove][2],PI[playerid][pImprove][3]);
	format(src,sizeof(src),"improves='%s',",PI[playerid][pImproves]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"fishki='%i',",PI[playerid][pFishki]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mats='%i',",PI[playerid][pMats]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phonenumber='%i',",PI[playerid][pPhoneNumber]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber1='%i',",PhoneNumbers[playerid][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber2='%i',",PhoneNumbers[playerid][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber3='%i',",PhoneNumbers[playerid][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber4='%i',",PhoneNumbers[playerid][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber5='%i',",PhoneNumbers[playerid][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber6='%i',",PhoneNumbers[playerid][5]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber7='%i',",PhoneNumbers[playerid][6]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber8='%i',",PhoneNumbers[playerid][7]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"lwarn='%i',",PI[playerid][pLWarn]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"family=%d,",PI[playerid][pFamily]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"familysozd=%d,",PI[playerid][pFamilySozd]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"familyzam=%d,",PI[playerid][pFamilyZam]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black0='%i',",BlackList[playerid][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black1='%i',",BlackList[playerid][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black2='%i',",BlackList[playerid][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black3='%i',",BlackList[playerid][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black4='%i',",BlackList[playerid][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black5='%i',",BlackList[playerid][5]);
	strcat(global_string,src,sizeof(global_string));

	/*format(src,sizeof(src),"black6='%i',",BlackList[playerid][6]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black7='%i',",BlackList[playerid][7]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black8='%i',",BlackList[playerid][8]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black9='%i',",BlackList[playerid][9]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black10='%i',",BlackList[playerid][10]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black11='%i',",BlackList[playerid][11]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black12='%i',",BlackList[playerid][12]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set1='%i',",Settings[playerid][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set2='%i',",Settings[playerid][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set3='%i',",Settings[playerid][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set4='%i',",Settings[playerid][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set5='%i',",Settings[playerid][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"countcars='%i',",PI[playerid][pCountCars]);
	strcat(global_string,src,sizeof(global_string));*/

	format(PI[playerid][pLics],16,"%i, %i, %i, %i",PI[playerid][pLic][0],PI[playerid][pLic][1],PI[playerid][pLic][2],PI[playerid][pLic][3]);
	format(src,sizeof(src),"lic='%s'",PI[playerid][pLics]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src)," WHERE name='%s' LIMIT 1",GetName(playerid));
	strcat(global_string,src,sizeof(global_string));
	mysql_tquery(dbHandle, global_string, "", "");
	return 1;
}

 

 

Заметка от DEST , создано

3.2. Код больше 10 строк необходимо брать в теги "Код" и "Спойлер". Как это сделать рассказано в разделе "FAQ".

Устное предупреждение.

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

@GLADE Оказалось что я не выставил нормальный стринг. *это было видно по концу* Сейчас выставил 2048 стринг и всё чётенько. Пустые строки были т.к никто не объявлил его в розыск. Тема закрыта.

Share this post


Link to post
Share on other sites
  • 0

Проблема хранится вот в этих двух переменных, пустые значения:

wantedwho='',wantedreason='',

Мод я тебе и сам могу сказать, если не ошибаюсь, то это Social (либо основа мода).
Вместо пустых значение можно поставить значение None.
Задавай стандартное значение переменным в структуре таблицы, если его нет.

Edited by GLADE

Share this post


Link to post
Share on other sites
  • 0

@GLADE Не-а, прописал None ничего не изменилось, убрал комментарии с black так-же ничего. Полистал мод black вообще не используется. В итоге я в ступоре :|
error:
 

[13:33:15 07/20/20] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1 (Query: "UPDATE `accounts` SET ip='127.0.0.1',level=1,admin=7,sex=1,age=19,securitycode='0',model=14,memberskin=0,cash=10126000,bank=-600,mute=0,warn=0,leader=0,templeader=0,member=0,rank=0,exp=2,news=0,crimes=0,wanted=0,familyrank=0,wantedtime=0,wantedwho=None,wantedreason=None,jail=0,job=0,jailtime=0,checktime=1000,drugs=0,married=0,whomarried='',paycheck='0',charity='0',vip='0',viptime='0',time='2',fstyle='0',skin1='0',skin2='0',skin3='0',spawnchange='2',sdpistol='0',deserteagle='0',shotgun='0',mp5='0',ak47='0',m4='0',pistol='0',microuzi='0',sportexp='0',zakon='2',checkcode='0',city='0',bed='0',watch='0',ciggare='0',sprunk='7000',mask='0',phonebalance='0',aptechka='0',Voennik='0',music='0',datavhod='20.7.2020',phone='0, 0',repcar='0, 0',improves='0, 0, 0, 0',fishki='0',mats='0',phonenumber='0',phnumber1='0',phnumber2='490653',phnumber3='4',phnumber4='0',phnumber5='0',phnumber6='0',phnumber7='0',phnumber8='0',lwarn='0',family=0,familysozd=0,familyzam=0,black0='0',black1='0',black2='0',black3='0',black4='0',black5='")

 saveacc:
 

Спойлер

stock SaveAccount(playerid)
{
	if(PlayerLogged[playerid] == false || IsPlayerConnected(playerid) == 0) return 1;
	new src[90], year, month, day;
	getdate(year, month, day);
	format(global_string,sizeof(global_string),"UPDATE "T_ACCOUNTS" SET ");
	format(src,sizeof(src),"ip='%s',",PI[playerid][pIP]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"level=%d,",PI[playerid][pLevel]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"admin=%d,",PI[playerid][pAdmin]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sex=%d,",PI[playerid][pSex]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"age=%d,",PI[playerid][pAge]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"securitycode='%i',",PI[playerid][pSecurityCode]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"model=%d,",PI[playerid][pModel]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"memberskin=%d,",PI[playerid][pMemberSkin]);
	strcat(global_string,src,sizeof(global_string));
	if(PI[playerid][pCash] < -1000000) PI[playerid][pCash] = BONUS_CASH;
	format(src,sizeof(src),"cash=%d,",PI[playerid][pCash]);
	strcat(global_string,src,sizeof(global_string));
	if(PI[playerid][pBank] < -1000000) PI[playerid][pBank] = 0;
	format(src,sizeof(src),"bank=%d,",PI[playerid][pBank]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mute=%d,",PI[playerid][pMuted]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"warn=%d,",PI[playerid][pWarn]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"leader=%d,",PI[playerid][pLeader]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"templeader=%d,",PI[playerid][pTempLeader]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"member=%d,",PI[playerid][pMember]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"rank=%d,",PI[playerid][pRank]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"exp=%d,",PI[playerid][pExp]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"news=%d,",PI[playerid][pNews]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"crimes=%d,",PI[playerid][pCrimes]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wanted=%d,",PI[playerid][pWanted]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"familyrank=%d,",PI[playerid][pFamilyRank]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wantedtime=%d,",PI[playerid][pWantedTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wantedwho=None,",PI[playerid][pWantedWho]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"wantedreason=None,",PI[playerid][pWantedReason]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"jail=%d,",PI[playerid][pJail]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"job=%d,",PI[playerid][pJob]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"jailtime=%d,",PI[playerid][pJailTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"checktime=%d,",PI[playerid][pCheckTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"drugs=%d,",PI[playerid][pDrugs]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"married=%d,",PI[playerid][pMarried]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"whomarried='%s',",PI[playerid][pWhoMarried]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"paycheck='%i',",PI[playerid][pPayCheck]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"charity='%i',",PI[playerid][pCharity]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"vip='%i',",PI[playerid][pVip]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"viptime='%i',",PI[playerid][pVipTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"time='%i',",PI[playerid][pTime]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"fstyle='%i',",PI[playerid][pFightStyle]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"skin1='%i',",PI[playerid][pSkin][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"skin2='%i',",PI[playerid][pSkin][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"skin3='%i',",PI[playerid][pSkin][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"spawnchange='%i',",PI[playerid][pSpawnChange]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sdpistol='%i',",PI[playerid][pGunSkill][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"deserteagle='%i',",PI[playerid][pGunSkill][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"shotgun='%i',",PI[playerid][pGunSkill][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mp5='%i',",PI[playerid][pGunSkill][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"ak47='%i',",PI[playerid][pGunSkill][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"m4='%i',",PI[playerid][pGunSkill][5]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"pistol='%i',",PI[playerid][pGunSkill][6]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"microuzi='%i',",PI[playerid][pGunSkill][7]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sportexp='%i',",PI[playerid][pSportExp]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"zakon='%i',",PI[playerid][pZakon]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"checkcode='%i',",PI[playerid][pCheckCode]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"city='%i',",PI[playerid][pCity]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"bed='%i',",PI[playerid][pBed]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"watch='%i',",PI[playerid][pWatch]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"ciggare='%i',",PI[playerid][pCiggare]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"sprunk='%i',",PI[playerid][pSprunk]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mask='%i',",PI[playerid][pMask]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phonebalance='%i',",PI[playerid][pPhoneBalance]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"aptechka='%i',",PI[playerid][pAptechka]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"Voennik='%i',",PI[playerid][pVoennik]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"music='%i',",PI[playerid][pMusic]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"datavhod='%d.%d.%d',",day, month, year);
	strcat(global_string,src,sizeof(global_string));
	format(PI[playerid][pPhones],16,"%i, %i",PI[playerid][pPhone][0],PI[playerid][pPhone][1]);
	format(src,sizeof(src),"phone='%s',",PI[playerid][pPhones]);
	strcat(global_string,src,sizeof(global_string));
	format(PI[playerid][pRepcars],16,"%i, %i",PI[playerid][pRepcar][0],PI[playerid][pRepcar][1]);
	format(src,sizeof(src),"repcar='%s',",PI[playerid][pRepcars]);
	strcat(global_string,src,sizeof(global_string));
	format(PI[playerid][pImproves],32,"%i, %i, %i, %i",PI[playerid][pImprove][0],PI[playerid][pImprove][1],PI[playerid][pImprove][2],PI[playerid][pImprove][3]);
	format(src,sizeof(src),"improves='%s',",PI[playerid][pImproves]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"fishki='%i',",PI[playerid][pFishki]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"mats='%i',",PI[playerid][pMats]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phonenumber='%i',",PI[playerid][pPhoneNumber]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber1='%i',",PhoneNumbers[playerid][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber2='%i',",PhoneNumbers[playerid][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber3='%i',",PhoneNumbers[playerid][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber4='%i',",PhoneNumbers[playerid][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber5='%i',",PhoneNumbers[playerid][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber6='%i',",PhoneNumbers[playerid][5]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber7='%i',",PhoneNumbers[playerid][6]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"phnumber8='%i',",PhoneNumbers[playerid][7]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"lwarn='%i',",PI[playerid][pLWarn]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"family=%d,",PI[playerid][pFamily]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"familysozd=%d,",PI[playerid][pFamilySozd]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"familyzam=%d,",PI[playerid][pFamilyZam]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black0='%i',",BlackList[playerid][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black1='%i',",BlackList[playerid][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black2='%i',",BlackList[playerid][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black3='%i',",BlackList[playerid][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black4='%i',",BlackList[playerid][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black5='%i',",BlackList[playerid][5]);
	strcat(global_string,src,sizeof(global_string));

	format(src,sizeof(src),"black6='%i',",BlackList[playerid][6]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black7='%i',",BlackList[playerid][7]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black8='%i',",BlackList[playerid][8]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black9='%i',",BlackList[playerid][9]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black10='%i',",BlackList[playerid][10]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black11='%i',",BlackList[playerid][11]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"black12='%i',",BlackList[playerid][12]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set1='%i',",Settings[playerid][0]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set2='%i',",Settings[playerid][1]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set3='%i',",Settings[playerid][2]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set4='%i',",Settings[playerid][3]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"set5='%i',",Settings[playerid][4]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src),"countcars='%i',",PI[playerid][pCountCars]);
	strcat(global_string,src,sizeof(global_string));

	format(PI[playerid][pLics],16,"%i, %i, %i, %i",PI[playerid][pLic][0],PI[playerid][pLic][1],PI[playerid][pLic][2],PI[playerid][pLic][3]);
	format(src,sizeof(src),"lic='%s'",PI[playerid][pLics]);
	strcat(global_string,src,sizeof(global_string));
	format(src,sizeof(src)," WHERE name='%s' LIMIT 1",GetName(playerid));
	strcat(global_string,src,sizeof(global_string));
	mysql_tquery(dbHandle, global_string, "", "");
	return 1;
}

 

 

Заметка от DEST , создано

3.2. Код больше 10 строк необходимо брать в теги "Код" и "Спойлер". Как это сделать рассказано в разделе "FAQ".

Устное предупреждение.

Share this post


Link to post
Share on other sites
  • 0

@FilGro, значит делай сохранение переменных wantedwho, wantedreason, whomarried отдельно.

Share this post


Link to post
Share on other sites
  • 0

@GLADE ёпарасате, кароче с каждым убитым сохранением *то есть ставлю none* лог продвигается

@GLADE хрен там был, все сохранения используются, а вот почему там пусто только бог знает. но тип смари чё ещё нашёл. это при логине

Спойлер

	PI[playerid][pID] = cache_get_field_content_int(0, "id");
	cache_get_field_content(0, "ip", PI[playerid][pLastIP], dbHandle, 16);
	PI[playerid][pAdmin] = cache_get_field_content_int(0, "admin");
	PI[playerid][pSecurityCode] = cache_get_field_content_int(0, "securitycode");
	PI[playerid][pCheckCode] = cache_get_field_content_int(0, "checkcode");
	cache_get_field_content(0, "mail", PI[playerid][pMail], dbHandle, 64);
	PI[playerid][pLevel] = cache_get_field_content_int(0, "level");
	PI[playerid][pCash] = cache_get_field_content_int(0, "cash");
	PI[playerid][pBank] = cache_get_field_content_int(0, "bank");
	PI[playerid][pExp] = cache_get_field_content_int(0, "exp");
	cache_get_field_content(0, "regip", PI[playerid][pRegIP], dbHandle, 16);
	cache_get_field_content(0, "datareg", PI[playerid][pRegData], dbHandle, 15);
	PI[playerid][pLeader] = cache_get_field_content_int(0, "leader");
	PI[playerid][pTempLeader] = cache_get_field_content_int(0, "templeader");
	PI[playerid][pMember] = cache_get_field_content_int(0, "member");
	PI[playerid][pRank] = cache_get_field_content_int(0, "rank");
	PI[playerid][pWarn] = cache_get_field_content_int(0, "warn");
	PI[playerid][pSex] = cache_get_field_content_int(0, "sex");
	PI[playerid][pAge] = cache_get_field_content_int(0, "age");
	PI[playerid][pModel] = cache_get_field_content_int(0, "model");
	PI[playerid][pMemberSkin] = cache_get_field_content_int(0, "memberskin");
	cache_get_field_content(0, "lic", PI[playerid][pLics], dbHandle, 16);
	PI[playerid][pMuted] = cache_get_field_content_int(0, "mute");
	PI[playerid][pCheckTime] = cache_get_field_content_int(0, "checktime");
	PI[playerid][pNews] = cache_get_field_content_int(0, "news");
	cache_get_field_content(0, "phone", PI[playerid][pPhones], dbHandle, 16);
	PI[playerid][pPhoneNumber] = cache_get_field_content_int(0, "phonenumber");
	cache_get_field_content(0, "text", PI[playerid][pTexts], dbHandle, 20);
	PI[playerid][pJail] = cache_get_field_content_int(0, "jail");
	PI[playerid][pJailTime] = cache_get_field_content_int(0, "jailtime");
	PI[playerid][pWanted] = cache_get_field_content_int(0, "wanted");
	PI[playerid][pWantedTime] = cache_get_field_content_int(0, "wantedtime");
	cache_get_field_content(0, "wantedwho", PI[playerid][pWantedWho], dbHandle, MAX_PLAYER_NAME);
	cache_get_field_content(0, "wantedreason", PI[playerid][pWantedReason], dbHandle, 32);
	PI[playerid][pDrugs] = cache_get_field_content_int(0, "drugs");
	PI[playerid][pCrimes] = cache_get_field_content_int(0, "crimes");
	PI[playerid][pJob] = cache_get_field_content_int(0, "job");
	PI[playerid][pMarried] = cache_get_field_content_int(0, "married");
	cache_get_field_content(0, "whomarried", PI[playerid][pWhoMarried], dbHandle, MAX_PLAYER_NAME);
	PI[playerid][pPayCheck] = cache_get_field_content_int(0, "paycheck");
	PI[playerid][pCharity] = cache_get_field_content_int(0, "charity");
	PI[playerid][pVip] = cache_get_field_content_int(0, "vip");
	PI[playerid][pVipTime] = cache_get_field_content_int(0, "viptime");
	PI[playerid][pTime] = cache_get_field_content_int(0, "time");
	PI[playerid][pFightStyle] = cache_get_field_content_int(0, "fstyle");
	PI[playerid][pSkin][0] = cache_get_field_content_int(0, "skin1");
	PI[playerid][pSkin][1] = cache_get_field_content_int(0, "skin2");
	PI[playerid][pSkin][2] = cache_get_field_content_int(0, "skin3");
	PI[playerid][pSpawnChange] = cache_get_field_content_int(0, "spawnchange");
	PI[playerid][pGunSkill][0] = cache_get_field_content_int(0, "sdpistol");
	PI[playerid][pGunSkill][1] = cache_get_field_content_int(0, "deserteagle");
	PI[playerid][pGunSkill][2] = cache_get_field_content_int(0, "shotgun");
	PI[playerid][pGunSkill][3] = cache_get_field_content_int(0, "mp5");
	PI[playerid][pGunSkill][4] = cache_get_field_content_int(0, "ak47");
	PI[playerid][pGunSkill][5] = cache_get_field_content_int(0, "m4");
	PI[playerid][pGunSkill][6] = cache_get_field_content_int(0, "pistol");
	PI[playerid][pGunSkill][7] = cache_get_field_content_int(0, "microuzi");
	PI[playerid][pSportExp] = cache_get_field_content_int(0, "sportexp");
	PI[playerid][pZakon] = cache_get_field_content_int(0, "zakon");
	PI[playerid][pCity] = cache_get_field_content_int(0, "city");
	cache_get_field_content(0, "repcar", PI[playerid][pRepcars], dbHandle, 16);
	PI[playerid][pBed] = cache_get_field_content_int(0, "bed");
	PI[playerid][pWatch] = cache_get_field_content_int(0, "watch");
	PI[playerid][pCiggare] = cache_get_field_content_int(0, "ciggare");
	PI[playerid][pSprunk] = cache_get_field_content_int(0, "sprunk");
	PI[playerid][pMask] = cache_get_field_content_int(0, "mask");
	PI[playerid][pPhoneBalance] = cache_get_field_content_int(0, "phonebalance");
	PI[playerid][pAptechka] = cache_get_field_content_int(0, "aptechka");
	PI[playerid][pVoennik] = cache_get_field_content_int(0, "Voennik");
	PI[playerid][pMusic] = cache_get_field_content_int(0, "music");
	cache_get_field_content(0, "improves", PI[playerid][pImproves], dbHandle, 32);
	cache_get_field_content(0, "settings", PI[playerid][pSettings], dbHandle, 32);
	PhoneNumbers[playerid][0] = cache_get_field_content_int(0, "phnumber1");
	PhoneNumbers[playerid][1] = cache_get_field_content_int(0, "phnumber2");
	PhoneNumbers[playerid][2] = cache_get_field_content_int(0, "phnumber3");
	PhoneNumbers[playerid][3] = cache_get_field_content_int(0, "phnumber4");
	PhoneNumbers[playerid][4] = cache_get_field_content_int(0, "phnumber5");
	PhoneNumbers[playerid][5] = cache_get_field_content_int(0, "phnumber6");
	PhoneNumbers[playerid][6] = cache_get_field_content_int(0, "phnumber7");
	PhoneNumbers[playerid][7] = cache_get_field_content_int(0, "phnumber8");
	PI[playerid][pMailConfirmed] = cache_get_field_content_int(0, "mailconf");
	PI[playerid][pFishki] = cache_get_field_content_int(0, "fishki");
	PI[playerid][pFamily] = cache_get_field_content_int(0, "family");
	PI[playerid][pFamilySozd] = cache_get_field_content_int(0, "familysozd");
	PI[playerid][pFamilyZam] = cache_get_field_content_int(0, "familyzam");
	BlackList[playerid][0] = cache_get_field_content_int(0, "black0");
	BlackList[playerid][1] = cache_get_field_content_int(0, "black1");
	BlackList[playerid][2] = cache_get_field_content_int(0, "black2");
	BlackList[playerid][3] = cache_get_field_content_int(0, "black3");
	BlackList[playerid][4] = cache_get_field_content_int(0, "black4");
	BlackList[playerid][5] = cache_get_field_content_int(0, "black5");
	BlackList[playerid][6] = cache_get_field_content_int(0, "black6");
	BlackList[playerid][7] = cache_get_field_content_int(0, "black7");
	BlackList[playerid][8] = cache_get_field_content_int(0, "black8");
	BlackList[playerid][9] = cache_get_field_content_int(0, "black9");
	BlackList[playerid][10] = cache_get_field_content_int(0, "black10");
	BlackList[playerid][11] = cache_get_field_content_int(0, "black11");
	BlackList[playerid][12] = cache_get_field_content_int(0, "black12");
	Settings[playerid][0] = cache_get_field_content_int(0, "set1");
	Settings[playerid][1] = cache_get_field_content_int(0, "set2");
	Settings[playerid][2] = cache_get_field_content_int(0, "set3");
	Settings[playerid][3] = cache_get_field_content_int(0, "set4");
	Settings[playerid][4] = cache_get_field_content_int(0, "set5");
	PI[playerid][pFamilyRank] =  cache_get_field_content_int(0, "familyrank");
	PI[playerid][pLWarn] = cache_get_field_content_int(0, "lwarn");
	PI[playerid][pCountCars] = cache_get_field_content_int(0, "countcars");
	PI[playerid][pElegantCoins] = cache_get_field_content_int(0, "credits");
	PI[playerid][pMats] = cache_get_field_content_int(0, "mats");
	PI[playerid][pSecurity] = cache_get_field_content_int(0, "google");
	PI[playerid][pLockPicks] = cache_get_field_content_int(0, "LockPick");
	PI[playerid][pBonusDay] = cache_get_field_content_int(0, "bonusday");
	PI[playerid][pBonusStatus] = cache_get_field_content_int(0, "bstatus");
	PI[playerid][pBankCount] = cache_get_field_content_int(0, "bankcount");

 


 

 

Заметка от DEST , создано

3.2. Код больше 10 строк необходимо брать в теги "Код" и "Спойлер". Как это сделать рассказано в разделе "FAQ".

Устное предупреждение.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0