01.06.2015, 21:28
Всем доброго времени суток.
В чём может быть проблема, плагин MySQL R39-3.
В лог пишет ошибку:
В чём может быть проблема, плагин MySQL R39-3.
В лог пишет ошибку:
PHP код:
[21:37:47] [ERROR] CMySQLQuery::Execute[LoginCallback] - (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 ''112233\' LIMIT 1' at line 1
PHP код:
publics: LoginCallback(playerid)
{
new rows, fields;
cache_get_data(rows, fields);
if(!rows)
{
if(GetPVarInt(playerid, "wrongPass") == 2) return DKICK(playerid, "Âû ââåëè 3 ðàçà íåâåðíûé ïàðîëü!");
SetPVarInt(playerid, "wrongPass", GetPVarInt(playerid, "wrongPass")+1);
return LoginDialog(playerid);
}
Block(playerid);
SetPlayerTime(playerid, timeserv, 0);
gPlayerLogged[playerid] = 1;
if(GetPVarInt(playerid,"pREgisrty") == 1) PlayerInfo[playerid][MysqlpID] = cache_get_field_content_int(0, "ID", dbHandle), SpawnPlayer(playerid);
else format(CommandMas,100,"Âû óñïåøíî àâòîðèçîâàëèñü! Íîìåð Âàøåãî àêêàóíòà: %d.",PlayerInfo[playerid][MysqlpID]), SendClientMessage(playerid,COLOR_GREY,CommandMas), TogglePlayerSpectating(playerid, 0), SetPVarInt(playerid,"PlayerSpec",1);
PlayerInfo[playerid][pTut] = cache_get_field_content_int(0, "pTut", dbHandle);
cache_get_field_content(0, "pKey", PlayerInfo[playerid][pKey], dbHandle, 30);
cache_get_field_content(0,"pEmail",PlayerInfo[playerid][pEmail], dbHandle, 40);
PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0, "pLevel", dbHandle);
PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "pAdmin", dbHandle);
PlayerInfo[playerid][pFuelcar] = cache_get_field_content_float(0, "pFuelcar", dbHandle);
PlayerInfo[playerid][pHeadValue] = cache_get_field_content_int(0, "pHeadValue", dbHandle);
PlayerInfo[playerid][pContract] = cache_get_field_content_int(0, "pContract", dbHandle);
PlayerInfo[playerid][pCar][0] = cache_get_field_content_int(0, "pCar", dbHandle);
PlayerInfo[playerid][pCar][1] = cache_get_field_content_int(0, "pCar2", dbHandle);
PlayerInfo[playerid][pHelper] = cache_get_field_content_int(0, "pHelper", dbHandle);
PlayerInfo[playerid][pDonateRank] = cache_get_field_content_int(0, "pDonateRank", dbHandle);
PlayerInfo[playerid][pSex] = cache_get_field_content_int(0, "pSex", dbHandle);
PlayerInfo[playerid][pMuted] = cache_get_field_content_int(0, "pMuted", dbHandle);
PlayerInfo[playerid][pCash] = cache_get_field_content_int(0, "pCash", dbHandle);
PlayerInfo[playerid][pDonatemoney] = cache_get_field_content_int(0, "pDonatemoney2", dbHandle);
PlayerInfo[playerid][pExp] = cache_get_field_content_int(0, "pExp", dbHandle);
PlayerInfo[playerid][pKills] = cache_get_field_content_int(0, "pKills", dbHandle);
PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0, "pJailed", dbHandle);
PlayerInfo[playerid][pJailTime] = cache_get_field_content_int(0, "pJailTime", dbHandle);
PlayerInfo[playerid][pLeader] = cache_get_field_content_int(0, "pLeader", dbHandle);
PlayerInfo[playerid][pMember] = cache_get_field_content_int(0, "pMember", dbHandle);
PlayerInfo[playerid][pRank] = cache_get_field_content_int(0, "pRank", dbHandle);
PlayerInfo[playerid][pJob] = cache_get_field_content_int(0, "pJob", dbHandle);
PlayerInfo[playerid][pChar] = cache_get_field_content_int(0, "pChar", dbHandle);
PlayerInfo[playerid][pModel] = cache_get_field_content_int(0, "pModel", dbHandle);
PlayerInfo[playerid][pPnumber] = cache_get_field_content_int(0, "pPnumber", dbHandle);
PlayerInfo[playerid][pPayDayHad] = cache_get_field_content_int(0, "pPayDayHad", dbHandle);
PlayerInfo[playerid][pWarns] = cache_get_field_content_int(0, "pWarns", dbHandle);
PlayerInfo[playerid][punWarns] = cache_get_field_content_int(0, "punWarns", dbHandle);
PlayerInfo[playerid][punWarnstime] = cache_get_field_content_int(0, "punWarnstime", dbHandle);
PlayerInfo[playerid][pFuel] = cache_get_field_content_int(0, "pFuel", dbHandle);
PlayerInfo[playerid][pMarried] = cache_get_field_content_int(0, "pMarried", dbHandle);
PlayerInfo[playerid][pMuteTime] = cache_get_field_content_int(0, "pMuteTime", dbHandle);
PlayerInfo[playerid][pMobile] = cache_get_field_content_int(0, "pMobile", dbHandle);
PlayerInfo[playerid][pBank] = cache_get_field_content_int(0, "pBank", dbHandle);
player_family [ playerid ] = cache_get_field_content_int(0, "family", dbHandle);
cache_get_field_content(0,"pDostup",PlayerInfo[playerid][pDostup], dbHandle, 34);
cache_get_field_content(0,"pIpReg",PlayerInfo[playerid][pIpReg], dbHandle, 16);
PlayerInfo[playerid][pZakonp] = cache_get_field_content_int(0, "pZakonp", dbHandle);
PlayerInfo[playerid][pProz] = cache_get_field_content_int(0, "pProz", dbHandle);
PlayerInfo[playerid][pWanted] = cache_get_field_content_int(0, "pWanted", dbHandle);
PlayerInfo[playerid][pRealDonate] = cache_get_field_content_int(0, "pRealDonate", dbHandle);
PlayerInfo[playerid][pNarcoZavisimost] = cache_get_field_content_int(0, "NZ", dbHandle);
PlayerInfo[playerid][pChas] = cache_get_field_content_int(0, "pChas", dbHandle);
PlayerInfo[playerid][pMin] = cache_get_field_content_int(0, "pMin", dbHandle);
PlayerInfo[playerid][pSec] = cache_get_field_content_int(0, "pSec", dbHandle);
PlayerInfo[playerid][pReprimands] = cache_get_field_content_int(0, "pReprimands", dbHandle);
cache_get_field_content(0,"pAdminRob",PlayerInfo[playerid][pAdminRobs], dbHandle, 30);
cache_get_field_content(0,"pLics",PlayerInfo[playerid][pLics], dbHandle, 16);
cache_get_field_content(0,"cVehcom",cVehcom[playerid][0], dbHandle, 74);
cache_get_field_content(0,"cVehcom2",cVehcom[playerid][1], dbHandle, 74);
cache_get_field_content(0,"pGunSkills",PlayerInfo[playerid][pGunSkills], dbHandle, 26);
cache_get_field_content(0,"pBandLoad",PlayerInfo[playerid][pBandLoad], dbHandle, 26);
sscanf(PlayerInfo[playerid][pAdminRobs], "p<,>a<i>[4]",PlayerInfo[playerid][pAdminRob]);
sscanf(PlayerInfo[playerid][pLics], "p<,>a<i>[5]",PlayerInfo[playerid][pLic]);
sscanf(cVehcom[playerid][0], "p<,>a<i>[14]",cVehcoms[playerid][0]);
sscanf(cVehcom[playerid][1], "p<,>a<i>[14]",cVehcoms[playerid][1]);
sscanf(PlayerInfo[playerid][pGunSkills], "p<,>a<i>[6]",PlayerInfo[playerid][pGunSKill]);
sscanf(PlayerInfo[playerid][pBandLoad], "p<,>a<i>[3]",PlayerInfo[playerid][pBand]);
ResetPlayerMoney(playerid);
ApplyAnimation(playerid,"BD_FIRE","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"benchpress","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"CAR","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"DANCING","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"FAT","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"GANGS","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"GHANDS","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"GRAFFITI","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"GRAVEYARD","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"MISC","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"SNM","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"VENDING","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
ApplyAnimation(playerid,"RIOT","null",0.0,0,0,0,0,0);
if(PlayerInfo[playerid][pAdmin] >= 1) // Åñëè óðîâåíü àäìèíêè èãðîêà áîëüøå èëè ðîâíî 1 - ïîêàçûâàåì òåêñäðàéâ ( pAdmin - ïåðåìåííàÿ àäìèíêè )
{
for(new i;i<10;i++) TextDrawShowForPlayer(playerid, CheatText[0][i]), TextDrawShowForPlayer(playerid, CheatText[1][i]);
}
SetHealth(playerid, 75);
if(GetPlayerHouse(playerid) || GetPlayerArendHouse(playerid)) LoadCarPlayerId(playerid,1), LoadCarPlayerId(playerid,2);
GangZoneShowForPlayer(playerid, Army, COLOR_YELLOW2);
PEfir[playerid] = INVALID_PLAYER_ID;
Pefir[playerid] = INVALID_PLAYER_ID;
if(player_family [ playerid ])family_info [ player_family [ playerid ] - 1 ] [ f_online ]++;
new playersip[16], MySQL[156], year, month, day;
getdate(year, month, day);
GetPlayerIp(playerid,playersip,sizeof(playersip));
format(MySQL, sizeof(MySQL), "UPDATE `Accounts` SET `pOnline` = '%i', `pGetonDate` = '%d/%d/%d', `pGetonIP` = '%s' WHERE `ID` = '%d' LIMIT 1",playerid,day,month,year,playersip,PlayerInfo[playerid][MysqlpID]);
mysql_function_query(dbHandle, MySQL, true, "", "d", playerid);
SetPlayerSkills(playerid);
return SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
}