PDA

Просмотр полной версии : [Вопрос] [Вопрос] ошибки в логах при работе с mysql-базой



Carlos Cooper
18.01.2018, 15:27
Столкнулся с проблемой в исправлении следующих ошибок:



[14:10:06] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('5')
[14:10:06] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('3')
[14:10:06] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('5')
[14:10:06] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('1')
[14:10:06] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('6')
[14:10:06] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('4')
[14:10:06] [ERROR] cache_get_row_int - invalid datatype
[14:10:06] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'Name_Surname' in 'where clause'





forward LoadAccount(playerid, tmp[]);
public LoadAccount(playerid, tmp[])
{
new string[128];
/*new string[64];
new playername[32];
GetPlayerName(playerid,playername,32);*/
new rows, fields;
cache_get_data(rows, fields);
if(!rows)
{
new logtires = 3 - PlayerLogTries[playerid];
PlayerLogTries[playerid]++;
if(PlayerLogTries[playerid] == 4) { SendClientMessage(playerid, COLOR_RED, "Вы были кикнуты по подозрению в взломе {ffffff}/q(uit)"); Kick(playerid); }

new login_str[512];
format(totalstring, 128, "{FFFFFF}Рады снова видеть Вас на сервере {27BBFA}Server name\n\n"); strcat(login_str, totalstring);
format(totalstring, 128, "{FFFFFF}Ваш аккаунт под ником {FA1E26}%s {FFFFFF}зарегистрирован на сервере\n",PlayerInfo[playerid][pSendername]); strcat(login_str, totalstring);
format(totalstring, 128, "Для игры на сервере, Вам необходимо ввести в окошко ниже свой пароль\n"); strcat(login_str, totalstring);
format(totalstring, 128, "Если Вы забыли свой пароль, то обратитесь к основателям сервера\n"); strcat(login_str, totalstring);
format(totalstring, 128, "Он будет запрашиваться каждый раз при входе на сервер\n\n"); strcat(login_str, totalstring);
format(totalstring, 128, "Введите пароль в поле, данное ниже:"); strcat(login_str, totalstring);
ShowPlayerDialog(playerid, D_ERRORPAS, 3, "{27FAAD}Авторизация", login_str, "Далее","Отмена");

format(string,128,"Вы ввели неправельный пароль от аккаунта. Осталось попыток для ввода: %d",logtires);
SendClientMessage(playerid, COLOR_WARNING, string);
return 1;
}
PlayerInfo[playerid][pID] = cache_get_row_int(0, 0, dbHandle);
cache_get_row(0, 1, PlayerInfo[playerid][pSendername], dbHandle, 32);
cache_get_row(0, 2, PlayerInfo[playerid][pPassword], dbHandle, 32);
cache_get_row(0, 3, PlayerInfo[playerid][pIP], dbHandle, 16);
PlayerInfo[playerid][pAdmin] = cache_get_row_int(0, 4, dbHandle);
cache_get_row(0, 5, PlayerInfo[playerid][pIpPassword], dbHandle, 32);
cache_get_row(0, 6, PlayerInfo[playerid][pMail], dbHandle, 64);
PlayerInfo[playerid][pLevel] = cache_get_row_int(0, 7, dbHandle);
PlayerInfo[playerid][pCash] = cache_get_row_int(0, 8, dbHandle);
PlayerInfo[playerid][pBank] = cache_get_row_int(0, 9, dbHandle);
PlayerInfo[playerid][pExp] = cache_get_row_int(0, 10, dbHandle);
cache_get_row(0, 11, PlayerInfo[playerid][pRegData], dbHandle, 16);
PlayerInfo[playerid][pLeader] = cache_get_row_int(0, 12, dbHandle);
PlayerInfo[playerid][pMember] = cache_get_row_int(0, 13, dbHandle);
PlayerInfo[playerid][pRank] = cache_get_row_int(0, 14, dbHandle);
PlayerInfo[playerid][pWarn] = cache_get_row_int(0, 15, dbHandle);
PlayerInfo[playerid][pSex] = cache_get_row_int(0, 16, dbHandle);
PlayerInfo[playerid][pModel] = cache_get_row_int(0, 17, dbHandle);
PlayerInfo[playerid][pChar] = cache_get_row_int(0, 18, dbHandle);
cache_get_row(0, 19, PlayerInfo[playerid][pLics], dbHandle, 16);
cache_get_row(0, 20, PlayerInfo[playerid][pGuns], dbHandle, 40);
cache_get_row(0, 21, PlayerInfo[playerid][pAmmos], dbHandle, 80);
PlayerInfo[playerid][pGunSkill][6] = cache_get_row_int(0, 22, dbHandle);
PlayerInfo[playerid][pMuted] = cache_get_row_int(0, 23, dbHandle);
PlayerInfo[playerid][pPick] = cache_get_row_int(0, 24, dbHandle);
PlayerInfo[playerid][pCheckTime] = cache_get_row_int(0, 25, dbHandle);
PlayerInfo[playerid][pNews] = cache_get_row_int(0, 26, dbHandle);
cache_get_row(0, 27, PlayerInfo[playerid][pPhones], dbHandle, 16);
cache_get_row(0, 28, PlayerInfo[playerid][pTexts], dbHandle, 20);
PlayerInfo[playerid][pMorgan] = cache_get_row_int(0, 29, dbHandle);
PlayerInfo[playerid][pMorganTime] = cache_get_row_int(0, 30, dbHandle);
PlayerInfo[playerid][pWanted] = cache_get_row_int(0, 31, dbHandle);
PlayerInfo[playerid][pWantedTime] = cache_get_row_int(0, 32, dbHandle);
cache_get_row(0, 33, PlayerInfo[playerid][pWantedWho], dbHandle, 32);
cache_get_row(0, 34, PlayerInfo[playerid][pWantedReason], dbHandle, 32);
PlayerInfo[playerid][pHeal] = cache_get_row_float(0, 35, dbHandle);
PlayerInfo[playerid][pDrugs] = cache_get_row_int(0, 36, dbHandle);
PlayerInfo[playerid][pMats] = cache_get_row_int(0, 37, dbHandle);
PlayerInfo[playerid][pCrimes] = cache_get_row_int(0, 38, dbHandle);
PlayerInfo[playerid][pJob] = cache_get_row_int(0, 39, dbHandle);
PlayerInfo[playerid][pMarried] = cache_get_row_int(0, 40, dbHandle);
cache_get_row(0, 41, PlayerInfo[playerid][pWhoMarried], dbHandle, 32);
cache_get_row(0, 42, PlayerInfo[playerid][pReferal], dbHandle, 32);
PlayerInfo[playerid][pRefMoney] = cache_get_row_int(0, 43, dbHandle);
PlayerInfo[playerid][pPayCheck] = cache_get_row_int(0, 44, dbHandle);
PlayerInfo[playerid][pFish] = cache_get_row_int(0, 45, dbHandle);
PlayerInfo[playerid][pLottery] = cache_get_row_int(0, 46, dbHandle);
PlayerInfo[playerid][pVIP] = cache_get_row_int(0, 47, dbHandle);
PlayerInfo[playerid][pTime] = cache_get_row_int(0, 48, dbHandle);
PlayerInfo[playerid][pFightStyle] = cache_get_row_int(0, 49, dbHandle);
PlayerInfo[playerid][pCreditss] = cache_get_row_int(0, 50, dbHandle);
PlayerInfo[playerid][pTotalCredits] = cache_get_row_int(0, 51, dbHandle);
PlayerInfo[playerid][pSkin1] = cache_get_row_int(0, 52, dbHandle);
PlayerInfo[playerid][pSkin2] = cache_get_row_int(0, 53, dbHandle);
PlayerInfo[playerid][pSkin3] = cache_get_row_int(0, 54, dbHandle);
PlayerInfo[playerid][pSpawnChange] = cache_get_row_int(0, 55, dbHandle);
PlayerInfo[playerid][pGunSkill][0] = cache_get_row_int(0, 56, dbHandle);
PlayerInfo[playerid][pGunSkill][1] = cache_get_row_int(0, 57, dbHandle);
PlayerInfo[playerid][pGunSkill][2] = cache_get_row_int(0, 58, dbHandle);
PlayerInfo[playerid][pGunSkill][3] = cache_get_row_int(0, 59, dbHandle);
PlayerInfo[playerid][pGunSkill][4] = cache_get_row_int(0, 60, dbHandle);
PlayerInfo[playerid][pGunSkill][5] = cache_get_row_int(0, 61, dbHandle);
PlayerInfo[playerid][pRPR] = cache_get_row_int(0, 62, dbHandle);
PlayerInfo[playerid][pGlasses] = cache_get_row_int(0, 63, dbHandle);
PlayerInfo[playerid][pSatiety] = cache_get_row_int(0, 64, dbHandle);
PlayerInfo[playerid][pRPRGive] = cache_get_row_int(0, 65, dbHandle);
PlayerInfo[playerid][pHealthS] = cache_get_row_float(0, 66, dbHandle);
PlayerInfo[playerid][pSportEXP] = cache_get_row_int(0, 67, dbHandle);
PlayerInfo[playerid][pOnline] = cache_get_row_int(0, 68, dbHandle);
PlayerInfo[playerid][pZakon] = cache_get_row_int(0, 69, dbHandle);
PlayerInfo[playerid][pBolezn] = cache_get_row_int(0, 70, dbHandle);
PlayerInfo[playerid][ProverkaIP] = cache_get_row_int(0, 71, dbHandle);
PlayerInfo[playerid][pHospital] = cache_get_row_int(0, 72, dbHandle);
PlayerInfo[playerid][pWatch] = cache_get_row_int(0, 73, dbHandle);
PlayerInfo[playerid][pCiggare] = cache_get_row_int(0, 74, dbHandle);
PlayerInfo[playerid][pSprunk] = cache_get_row_int(0, 75, dbHandle);
PlayerInfo[playerid][pMask] = cache_get_row_int(0, 76, dbHandle);
PlayerInfo[playerid][pPhoneBalance] = cache_get_row_int(0, 77, dbHandle);
PlayerInfo[playerid][pTruckSkill] = cache_get_row_int(0, 78, dbHandle);
PlayerInfo[playerid][cModel][0] = cache_get_row_int(0, 79, dbHandle);
PlayerInfo[playerid][cX][0] = cache_get_row_float(0, 80, dbHandle);
PlayerInfo[playerid][cY][0] = cache_get_row_float(0, 81, dbHandle);
PlayerInfo[playerid][cZ][0] = cache_get_row_float(0, 82, dbHandle);
PlayerInfo[playerid][cFa][0] = cache_get_row_float(0, 83, dbHandle);
PlayerInfo[playerid][cFuel][0] = cache_get_row_int(0, 84, dbHandle);
cache_get_row(0, 85, PlayerInfo[playerid][cNumber1], dbHandle, 64);
PlayerInfo[playerid][cCarAr][0] = cache_get_row_int(0, 86, dbHandle);
PlayerInfo[playerid][cClass][0] = cache_get_row_int(0, 87, dbHandle);
PlayerInfo[playerid][cColor1][0] = cache_get_row_int(0, 88, dbHandle);
PlayerInfo[playerid][cColor1][1] = cache_get_row_int(0, 89, dbHandle);
PlayerInfo[playerid][cLock][0] = cache_get_row_int(0, 90, dbHandle);
PlayerInfo[playerid][cCost][0] = cache_get_row_int(0, 91, dbHandle);
cache_get_row(0, 92, PlayerInfo[playerid][cVehcom1], dbHandle, 64);
PlayerInfo[playerid][cPaintjob][0] = cache_get_row_int(0, 93, dbHandle);
PlayerInfo[playerid][pSpawn] = cache_get_row_int(0, 94, dbHandle);
PlayerInfo[playerid][pVb] = cache_get_row_int(0, 95, dbHandle);
cache_get_row(0, 96, PlayerInfo[playerid][pWorkBook], dbHandle, 16);
PlayerInfo[playerid][pVIPDate] = cache_get_row_int(0, 97, dbHandle);

PlayerInfo[playerid][cModel][1] = cache_get_row_int(0, 98, dbHandle);
PlayerInfo[playerid][cX][1] = cache_get_row_float(0, 99, dbHandle);
PlayerInfo[playerid][cY][1] = cache_get_row_float(0, 100, dbHandle);
PlayerInfo[playerid][cZ][1] = cache_get_row_float(0, 101, dbHandle);
PlayerInfo[playerid][cFa][1] = cache_get_row_float(0, 102, dbHandle);
PlayerInfo[playerid][cFuel][1] = cache_get_row_int(0, 103, dbHandle);
cache_get_row(0, 104, PlayerInfo[playerid][cNumber2], dbHandle, 64);
PlayerInfo[playerid][cCarAr][1] = cache_get_row_int(0, 105, dbHandle);
PlayerInfo[playerid][cClass][1] = cache_get_row_int(0, 106, dbHandle);
PlayerInfo[playerid][cColor2][0] = cache_get_row_int(0, 107, dbHandle);
PlayerInfo[playerid][cColor2][1] = cache_get_row_int(0, 108, dbHandle);
PlayerInfo[playerid][cLock][1] = cache_get_row_int(0, 109, dbHandle);
PlayerInfo[playerid][cCost][1] = cache_get_row_int(0, 110, dbHandle);
cache_get_row(0, 111, PlayerInfo[playerid][cVehcom2], dbHandle, 64);
PlayerInfo[playerid][cPaintjob][1] = cache_get_row_int(0, 112, dbHandle);

PlayerInfo[playerid][cModel][2] = cache_get_row_int(0, 113, dbHandle);
PlayerInfo[playerid][cX][2] = cache_get_row_float(0, 114, dbHandle);
PlayerInfo[playerid][cY][2] = cache_get_row_float(0, 115, dbHandle);
PlayerInfo[playerid][cZ][2] = cache_get_row_float(0, 116, dbHandle);
PlayerInfo[playerid][cFa][2] = cache_get_row_float(0, 117, dbHandle);
PlayerInfo[playerid][cFuel][2] = cache_get_row_int(0, 118, dbHandle);
cache_get_row(0, 119, PlayerInfo[playerid][cNumber3], dbHandle, 64);
PlayerInfo[playerid][cCarAr][2] = cache_get_row_int(0, 120, dbHandle);
PlayerInfo[playerid][cClass][2] = cache_get_row_int(0, 121, dbHandle);
PlayerInfo[playerid][cColor3][0] = cache_get_row_int(0, 122, dbHandle);
PlayerInfo[playerid][cColor3][1] = cache_get_row_int(0, 123, dbHandle);
PlayerInfo[playerid][cLock][2] = cache_get_row_int(0, 124, dbHandle);
PlayerInfo[playerid][cCost][2] = cache_get_row_int(0, 125, dbHandle);
cache_get_row(0, 126, PlayerInfo[playerid][cVehcom3], dbHandle, 64);
PlayerInfo[playerid][cPaintjob][2] = cache_get_row_int(0, 127, dbHandle);
PlayerInfo[playerid][pCars] = cache_get_row_int(0, 128, dbHandle);
PlayerInfo[playerid][pAdmPass] = cache_get_row_int(0, 129, dbHandle);
PlayerInfo[playerid][pTimeSpec] = cache_get_row_int(0, 130, dbHandle);
PlayerInfo[playerid][pTimeRestart] = cache_get_row_int(0, 131, dbHandle);
PlayerInfo[playerid][pTimeDay] = cache_get_row_int(0, 132, dbHandle);
PlayerInfo[playerid][pKickCount] = cache_get_row_int(0, 133, dbHandle);
PlayerInfo[playerid][pBanCount] = cache_get_row_int(0, 134, dbHandle);
PlayerInfo[playerid][pWarnCount] = cache_get_row_int(0, 135, dbHandle);
PlayerInfo[playerid][pJailCount] = cache_get_row_int(0, 136, dbHandle);
PlayerInfo[playerid][pAnsCount] = cache_get_row_int(0, 137, dbHandle);
cache_get_row(0, 138, PlayerInfo[playerid][pLastVisit], dbHandle, 64);
SendFamily[playerid] = cache_get_row_int(0, 139, dbHandle);
SendAdmin[playerid] = cache_get_row_int(0, 140, dbHandle);
ShowGreenZone[playerid] = cache_get_row_int(0, 141, dbHandle);
ShowLogo[playerid] = cache_get_row_int(0, 142, dbHandle);
ShowVk[playerid] = cache_get_row_int(0, 143, dbHandle);
ShowDate[playerid] = cache_get_row_int(0, 144, dbHandle);
ShowKeys[playerid] = cache_get_row_int(0, 145, dbHandle);
ShowSpeed[playerid] = cache_get_row_int(0, 146, dbHandle);
ShowOgran[playerid] = cache_get_row_int(0, 147, dbHandle);

sscanf(PlayerInfo[playerid][cVehcom1], "p<,>a<i>[14]",PlayerInfo[playerid][cVehcoms1]);
sscanf(PlayerInfo[playerid][cVehcom2], "p<,>a<i>[14]",PlayerInfo[playerid][cVehcoms2]);
sscanf(PlayerInfo[playerid][cVehcom3], "p<,>a<i>[14]",PlayerInfo[playerid][cVehcoms3]);
PlayerLogged[playerid] = true;
TimeLogged[playerid] = -1;
if(ShowVk[playerid] == 1) for(new i; i < 4; i++) TextDrawShowForPlayer(playerid, logotip_vk[i]);
if(ShowLogo[playerid] == 1) for(new i; i < 4; i++) TextDrawShowForPlayer(playerid, logotip[i]);
if(ShowDate[playerid] == 1) for(new i; i < 2; i++) TextDrawShowForPlayer(playerid, logotip_data[i]);


sscanf(PlayerInfo[playerid][pTexts], "p<,>a<i>[3]", PlayerInfo[playerid][pText]);
sscanf(PlayerInfo[playerid][pPhones], "p<,>a<i>[3]", PlayerInfo[playerid][pPhone]);
sscanf(PlayerInfo[playerid][pLics], "p<,>a<i>[5]",PlayerInfo[playerid][pLic]);
sscanf(PlayerInfo[playerid][pWorkBook], "p<,>a<i>[6]",PlayerInfo[playerid][pWB]);





CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(24) CHARACTER SET utf8 NOT NULL,
`password` varchar(32) CHARACTER SET utf8 NOT NULL,
`ip` varchar(16) CHARACTER SET utf8 NOT NULL DEFAULT '0.0.0.0',
`veh_number` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`veh_reg` int(1) NOT NULL DEFAULT '0',
`admin` int(11) NOT NULL DEFAULT '0',
`securitycode` int(11) NOT NULL DEFAULT '0',
`checkcode` int(11) NOT NULL DEFAULT '0',
`mail` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT 'None',
`level` int(11) NOT NULL DEFAULT '10',
`cash` int(11) NOT NULL DEFAULT '10000000',
`bank` int(11) NOT NULL DEFAULT '250',
`exp` int(11) NOT NULL DEFAULT '0',
`regip` varchar(16) CHARACTER SET utf8 NOT NULL DEFAULT '0.0.0.0',
`datareg` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '0.0.0',
`leader` int(3) NOT NULL DEFAULT '0',
`templeader` int(3) NOT NULL DEFAULT '0',
`member` int(3) NOT NULL DEFAULT '0',
`rank` int(3) NOT NULL DEFAULT '0',
`warn` int(11) NOT NULL DEFAULT '0',
`sex` int(11) NOT NULL DEFAULT '0',
`age` int(11) NOT NULL DEFAULT '0',
`model` int(11) NOT NULL DEFAULT '0',
`memberskin` int(11) NOT NULL DEFAULT '0',
`lic` varchar(16) CHARACTER SET utf8 NOT NULL DEFAULT '1, 1, 1, 1, 1',
`guns` varchar(56) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0,0,0,0,0,0,0,0,0,0,0,0,0',
`ammos` varchar(56) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0,0,0,0,0,0,0,0,0,0,0,0,0',
`mute` int(11) NOT NULL DEFAULT '0',
`pick` int(11) NOT NULL DEFAULT '0',
`checktime` int(6) NOT NULL DEFAULT '0',
`news` int(11) NOT NULL DEFAULT '0',
`phone` varchar(16) CHARACTER SET utf8 NOT NULL DEFAULT '0, 0',
`phonenumber` int(11) NOT NULL DEFAULT '0',
`text` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '0, 0, 0, 0',
`jail` int(11) NOT NULL DEFAULT '0',
`jailtime` int(11) NOT NULL DEFAULT '0',
`wanted` int(11) NOT NULL DEFAULT '0',
`wantedtime` int(11) NOT NULL DEFAULT '0',
`wantedwho` varchar(24) CHARACTER SET utf8 NOT NULL DEFAULT 'None',
`wantedreason` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT 'None',
`heal` varchar(11) CHARACTER SET utf8 NOT NULL DEFAULT '100.0',
`drugs` int(11) NOT NULL DEFAULT '0',
`patron` int(11) NOT NULL DEFAULT '0',
`gunamount` int(11) NOT NULL DEFAULT '0',
`crimes` int(11) NOT NULL DEFAULT '0',
`job` int(11) NOT NULL DEFAULT '0',
`married` int(11) NOT NULL DEFAULT '0',
`whomarried` varchar(24) CHARACTER SET utf8 NOT NULL DEFAULT 'None',
`referal` varchar(24) CHARACTER SET utf8 NOT NULL DEFAULT 'None',
`refmoney` int(11) NOT NULL DEFAULT '0',
`paycheck` int(11) NOT NULL DEFAULT '0',
`charity` int(11) NOT NULL DEFAULT '0',
`vip` int(11) NOT NULL DEFAULT '0',
`viptime` int(11) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL DEFAULT '0',
`fstyle` int(11) NOT NULL DEFAULT '0',
`credits` int(11) NOT NULL DEFAULT '1000',
`totalcredits` int(11) NOT NULL DEFAULT '0',
`skin1` int(11) NOT NULL DEFAULT '0',
`skin2` int(11) NOT NULL DEFAULT '0',
`skin3` int(11) NOT NULL DEFAULT '0',
`spawnchange` int(11) NOT NULL DEFAULT '0',
`sdpistol` int(11) NOT NULL DEFAULT '0',
`deserteagle` int(11) NOT NULL DEFAULT '0',
`shotgun` int(11) NOT NULL DEFAULT '0',
`mp5` int(11) NOT NULL DEFAULT '0',
`ak47` int(11) NOT NULL DEFAULT '0',
`m4` int(11) NOT NULL DEFAULT '0',
`pistol` int(11) NOT NULL DEFAULT '0',
`microuzi` int(11) NOT NULL DEFAULT '0',
`hunger` int(11) NOT NULL DEFAULT '100',
`healths` float NOT NULL DEFAULT '100',
`sportexp` int(11) NOT NULL DEFAULT '0',
`online` int(11) NOT NULL DEFAULT '0',
`zakon` int(11) NOT NULL DEFAULT '0',
`city` int(11) NOT NULL DEFAULT '0',
`repcar` varchar(16) CHARACTER SET utf8 NOT NULL DEFAULT '0, 0',
`bed` int(11) NOT NULL,
`watch` int(11) NOT NULL DEFAULT '0',
`ciggare` int(11) NOT NULL DEFAULT '0',
`sprunk` int(11) NOT NULL DEFAULT '7000',
`mask` int(11) NOT NULL DEFAULT '0',
`phonebalance` int(11) NOT NULL DEFAULT '100',
`truckskill` int(11) NOT NULL DEFAULT '0',
`cModel` int(11) NOT NULL DEFAULT '462',
`cClass` int(11) NOT NULL DEFAULT '4',
`cFuel` int(11) NOT NULL DEFAULT '0',
`cColor1` int(11) NOT NULL DEFAULT '0',
`cColor2` int(11) NOT NULL DEFAULT '0',
`cLock` int(11) NOT NULL DEFAULT '0',
`cCost` int(11) NOT NULL DEFAULT '0',
`cVehcom` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0,0,0,0,0,0,0,0,0,0,0,0,0,0',
`cPaintjob` int(11) NOT NULL DEFAULT '3',
`aptechka` int(11) NOT NULL DEFAULT '0',
`Voennik` int(11) NOT NULL DEFAULT '0',
`music` int(11) NOT NULL DEFAULT '0',
`improves` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT '0, 0, 0, 0',
`datavhod` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '0.0.0',
`settings` int(11) NOT NULL DEFAULT '15',
`phnumber1` int(11) NOT NULL DEFAULT '0',
`phnumber2` int(11) NOT NULL DEFAULT '0',
`phnumber3` int(11) NOT NULL DEFAULT '0',
`phnumber4` int(11) NOT NULL DEFAULT '0',
`phnumber5` int(11) NOT NULL DEFAULT '0',
`phnumber6` int(11) NOT NULL DEFAULT '0',
`phnumber7` int(11) NOT NULL DEFAULT '0',
`phnumber8` int(11) NOT NULL DEFAULT '0',
`vehiclekey` int(11) NOT NULL DEFAULT '0',
`mailconf` int(11) NOT NULL DEFAULT '0',
`fishki` int(11) NOT NULL DEFAULT '0',
`vehiclekey1` int(11) NOT NULL,
`cX` float NOT NULL,
`cY` float NOT NULL,
`cZ` float NOT NULL,
`cA` float NOT NULL,
`cX1` float NOT NULL,
`cY1` float NOT NULL,
`cZ1` float NOT NULL,
`cA1` float NOT NULL,
`cModel1` int(11) NOT NULL,
`cClass1` int(11) NOT NULL,
`cFuel1` int(11) NOT NULL,
`cColor_1` int(11) NOT NULL,
`cColor_2` int(11) NOT NULL,
`cLock1` int(11) NOT NULL,
`cCost1` int(11) NOT NULL,
`cVehcom1` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`cPaintjob1` int(11) NOT NULL,
`veh_number1` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`cVirtual1` int(11) NOT NULL,
`cVirtual2` int(11) NOT NULL,
`family` int(11) NOT NULL,
`familysozd` int(11) NOT NULL,
`familyzam` int(11) NOT NULL,
`black0` int(1) NOT NULL,
`black1` int(1) NOT NULL,
`black2` int(1) NOT NULL,
`black3` int(1) NOT NULL,
`black4` int(1) NOT NULL,
`black5` int(1) NOT NULL,
`black6` int(1) NOT NULL,
`black7` int(1) NOT NULL,
`black8` int(1) NOT NULL,
`black9` int(1) NOT NULL,
`black10` int(1) NOT NULL,
`black11` int(11) NOT NULL,
`black12` int(11) NOT NULL,
`set1` int(1) NOT NULL,
`set2` int(1) NOT NULL,
`set3` int(1) NOT NULL,
`set4` int(1) NOT NULL,
`set5` int(1) NOT NULL,
`set6` int(1) NOT NULL,
`set7` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf32 AUTO_INCREMENT=2427 ;

pawnoholic
18.01.2018, 17:28
Покажите ваш код запроса.

И данные из кэша на мой взгляд лучше извлекать по имени поля, а не по индексу.

Также посоветовал бы вам обновить плагин до последней версии.

Carlos Cooper
18.01.2018, 21:08
case D_LOGIN:
{

for(new i = strlen(inputtext); i != 0; --i)
switch(inputtext[i])
{
case 'А'..'Я', 'а'..'я', ' ':
return SendClientMessage(playerid, COLOR_WARNING, "Смените раскладку клавиатуры на английскую и повторите ввод"), ShowDialogLogin(playerid);
}
if(response)
{
if(!strlen(inputtext))
{
new login_str[512];
format(totalstring, 128, "{FFFFFF}Рады снова видеть Вас на сервере {27BBFA}Server name\n\n"); strcat(login_str, totalstring);
format(totalstring, 128, "{FFFFFF}Ваш аккаунт под ником {FA1E26}%s {FFFFFF}зарегистрирован на сервере\n",PlayerInfo[playerid][pSendername]); strcat(login_str, totalstring);
format(totalstring, 128, "Для игры на сервере, Вам необходимо ввести в окошко ниже свой пароль\n"); strcat(login_str, totalstring);
format(totalstring, 128, "Если Вы забыли свой пароль, то обратитесь к основателям сервера\n"); strcat(login_str, totalstring);
format(totalstring, 128, "Он будет запрашиваться каждый раз при входе на сервер\n\n"); strcat(login_str, totalstring);
format(totalstring, 128, "Введите пароль в поле, данное ниже:"); strcat(login_str, totalstring);
ShowPlayerDialog(playerid, D_LOGIN, 3, "{27FAAD}Авторизация", login_str, "Далее","Отмена");
return SendClientMessage(playerid, COLOR_WARNING, "Вы ничего не ввели в окно ввода пароля!");
}
/*new ipcheckon = strval(GetAccount(PlayerInfo[playerid][pSendername], "ipcheck"));
new pip[32];
GetPlayerIp(playerid,pip,sizeof(pip));
if(ipcheckon == 1 && !strcmp(pip, GetAccount(PlayerInfo[playerid][pSendername], "ippassword"), true))
{
format(string, 256, "{FFFFFF}Проверка по IP включена, введите пароль IP!",PlayerInfo[playerid][pSendername]);
ShowPlayerDialog(playerid, 12341, 3, "{66CC00}Проверка по IP | NETWORK RP", string, "Принять","Отмена");
}
else
{*/
mysql_format(dbHandle, query,256, "SELECT * FROM "TABLE_ACCOUNT" WHERE name = '%s' AND password = '%e' LIMIT 1", PlayerInfo[playerid][pSendername], inputtext);
mysql_tquery(dbHandle, query, "LoadAccount", "ds", playerid, inputtext);
/*else
{
new logtires = 3 - PlayerLogTries[playerid];
PlayerLogTries[playerid]++;
if(PlayerLogTries[playerid] == 4) { SendClientMessage(playerid,COLOR_LIGHTRED, "{3697E1}— {FFFFFF}Вы были кикнуты по подозрению в взломе {ffffff}/q(uit)"); Kick(playerid); }
format(string,256,"{FFFFFF}Вы ввели неправельный пароль от аккаунта.\n\n{FFFFFF}Попыток ввода пароля осталось : %d",logtires);
ShowPlayerDialog(playerid, D_ERRORPAS,DIALOG_STYLE_MSGBOX,"{66CC00}Авторизация",string,"Повтор","Выйти");

}*/
}
else { SendClientMessage(playerid, COLOR_LIGHTRED, ""PlayerNeedToLoggedForToPlay""); }
}

pawnoholic
18.01.2018, 21:59
У вас типы данных в таблице не соответствуют типу данных GetRowData.

Повторюсь, что:


И данные из кэша на мой взгляд лучше извлекать по имени поля, а не по индексу.



cache_get_value_name(row_idx, const column_name[], destination[], max_len = sizeof(destination)
cache_get_value_name_int(row_idx, const column_name[], destination)
cache_get_value_name_float(row_idx, const column_name[], Float:destination)
cache_get_value_name_bool(row_idx, column_name[], &bool:destination)

Carlos Cooper
18.01.2018, 22:14
Я понимаю. Какие именно ? Не смог найти.

pawnoholic
18.01.2018, 22:24
Я понимаю. Какие именно ? Не смог найти.

Например вы извлекаете значение типа int из поля под индексом 4, когда оно у вас в таблице другого типа данных.

PlayerInfo[playerid][pAdmin] = cache_get_row_int(0, 4, dbHandle);

Судя по вашей таблице, поле admin у вас вообще под 6 индексом.



0 - id
1 - name
2 - password
3 - ip
4 - veh_number
5 - veh_reg
6 - admin
...


И это наверное не одна ошибка, указал только, то что сразу в глаза бросается.

Carlos Cooper
18.01.2018, 23:17
Спасибо за помощь. Вопрос исчерпан.