09.10.2017, 16:05
Hi i need help in my problem.
Look this it's a log with my mysql_log.txt
This is logging system connected with Invisione Power Board
Function:
I coded in UTF8
Look this it's a log with my mysql_log.txt
Код HTML:
[20:12:37] CMySQLHandler::Query(SELECT c.player_uid FROM `members` m, `srv_characters` c WHERE m.`members_pass_hash` = MD5(CONCAT(MD5(m.members_pass_salt),'', MD5('xxx123'))) AND m.`member_id` = c.`global_id` AND c.`nickname` = 'Tomy_Gun' LIMIT 1) - An error has occured. (Error ID: 1267, Illegal mix of collations (latin2_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=') [20:12:37] >> mysql_store_result( Connection handle: 1 ) [20:12:37] CMySQLHandler::StoreResult() - No data to store. [20:12:37] >> mysql_num_rows( Connection handle: 1 ) [20:12:37] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection) [20:12:37] >> mysql_fetch_int( Connection handle: 1 ) [20:12:37] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result) [20:12:37] >> mysql_query( Connection handle: 1 )
Function:
Код:
public OnPlayerLogin(playerid, charid) { new query[512], last_online, logged, data[64]; mysql_query_format("SELECT * FROM `srv_characters` WHERE `player_uid` = '%d' LIMIT 1", charid); mysql_store_result(); if(mysql_num_rows()) { mysql_fetch_row_format(query); sscanf(query, "p<|>dds[24]ddddddfddddfffdddddddddddddddddddddddddddddfdd", CharacterInfo[playerid][pUID], CharacterInfo[playerid][pGID], CharacterInfo[playerid][pNick], CharacterInfo[playerid][pAge], CharacterInfo[playerid][pSex], CharacterInfo[playerid][pSkin], CharacterInfo[playerid][pCash], CharacterInfo[playerid][pHours], CharacterInfo[playerid][pMinutes], CharacterInfo[playerid][pHealth], CharacterInfo[playerid][pAdmin], CharacterInfo[playerid][pHide], CharacterInfo[playerid][pCredit], CharacterInfo[playerid][pBW], CharacterInfo[playerid][pPos][0], CharacterInfo[playerid][pPos][1], CharacterInfo[playerid][pPos][2], CharacterInfo[playerid][pVW], CharacterInfo[playerid][pInt], CharacterInfo[playerid][pTog], CharacterInfo[playerid][pBlock], CharacterInfo[playerid][pGlod], CharacterInfo[playerid][pSpawnOption], CharacterInfo[playerid][pSpawnOptionHouseID], CharacterInfo[playerid][pBlockNoGun], CharacterInfo[playerid][pBlockNoCar], CharacterInfo[playerid][pBlockNoOOC], CharacterInfo[playerid][pBlockNoRun], CharacterInfo[playerid][pJail], CharacterInfo[playerid][pJailTime], logged, last_online, CharacterInfo[playerid][pOnlineToday], CharacterInfo[playerid][pJob], CharacterInfo[playerid][pJobCount], CharacterInfo[playerid][pDocs], CharacterInfo[playerid][pPhone], CharacterInfo[playerid][pKanal], CharacterInfo[playerid][pHotel], CharacterInfo[playerid][pPenaltyPoints], CharacterInfo[playerid][pStrength], CharacterInfo[playerid][pStrengthToday], CharacterInfo[playerid][pDriverPenalty], CharacterInfo[playerid][pCelebrity], CharacterInfo[playerid][pFightStyle], CharacterInfo[playerid][pSuplement], CharacterInfo[playerid][pLastDMG], CharacterInfo[playerid][pLastHB], CharacterInfo[playerid][pLastWEAP]); mysql_free_result(); // Wczytywanie informacji OOC format(query,sizeof(query),"SELECT `members_display_name`, `score`, `premium`, `warn`, `curse`, `aj` FROM `members` WHERE `member_id` = '%d'", CharacterInfo[playerid][pGID]); mysql_query(query); mysql_store_result(); while(mysql_fetch_row_format(data, "|") == 1) sscanf(data, "p<|>s[32]ddddd", CharacterInfo[playerid][pGlobalNick], CharacterInfo[playerid][pGlobalScore], CharacterInfo[playerid][pPremium], CharacterInfo[playerid][pWarn], CharacterInfo[playerid][pCurse], CharacterInfo[playerid][pAJ]); mysql_free_result(); if(CheckBan(playerid, CharacterInfo[playerid][pGID])) { msg_info(playerid,"Twoje konto jest niekatywne lub posiada aktywną banicję.\nJeśli jest to błąd - zapraszamy na forum."); KickWithWait(playerid); } else if((CharacterInfo[playerid][pBlock] & BLOCK_CHAR) || (CharacterInfo[playerid][pBlock] & BLOCK_CK)) { msg_info(playerid,"Twoja postać została zablokowana lub uśmiercona."); KickWithWait(playerid); } else if(CharacterInfo[playerid][pBlock] & BLOCK_BAN) { msg_info(playerid,"Twoja postać została zbanowana."); KickWithWait(playerid); } else { ForeachPlayer(i) { if(CharacterInfo[i][pGID] == CharacterInfo[playerid][pGID] && Logged[i]) { msg_error(playerid, "Jedna z Twoich postaci jest już zalogowana na serwerze."); KickWithWait(playerid); break; } } format(query,sizeof(query),"UPDATE `srv_characters` SET `logged` = '1', `last_online` = '%d' WHERE `player_uid` = '%d'", gettime(), CharacterInfo[playerid][pUID]); mysql_query(query); format(query,sizeof(query),"INSERT INTO `srv_login_logs` VALUES ('%d','%d','%s','%d')", CharacterInfo[playerid][pGID], CharacterInfo[playerid][pUID], GetAccountIP(playerid), gettime()); mysql_query(query); LoadPlayerGroups(playerid); if(!(CharacterInfo[playerid][pTog] & TOG_QS) && (gettime()-last_online < 900)) CharacterInfo[playerid][pTog] += TOG_QS; if(Spawned[playerid] < 5) Spawned[playerid] = 5; SetPlayerSpawn(playerid); TogglePlayerSpectating(playerid, false); SpawnPlayer(playerid); if(CharacterInfo[playerid][pTog] & TOG_QS) SetTimerEx("PlayerTogQsOffOnLogin", 1500, false, "i", playerid); // Ustawianie HP SetPlayerHealth(playerid, CharacterInfo[playerid][pHealth]); SetPlayerScore(playerid, CharacterInfo[playerid][pGlobalScore]); // Aktualizacja gotуwki ResetPlayerMoney(playerid); GivePlayerMoney(playerid, CharacterInfo[playerid][pCash]); //Skill broni SetPlayerSkillLevel(playerid, 0, 500); SetPlayerSkillLevel(playerid, 1, 999); SetPlayerSkillLevel(playerid, 2, 999); SetPlayerSkillLevel(playerid, 3, 999); SetPlayerSkillLevel(playerid, 4, 500); SetPlayerSkillLevel(playerid, 5, 500); SetPlayerSkillLevel(playerid, 6, 500); SetPlayerSkillLevel(playerid, 7, 999); SetPlayerSkillLevel(playerid, 8, 500); SetPlayerSkillLevel(playerid, 9, 500); SetPlayerSkillLevel(playerid, 10, 500); switch(CharacterInfo[playerid][pFightStyle]) { case 0: SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK); case 1: SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING); case 2: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); case 3: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD); default: SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK); } // Ustawienia TOG if(!(CharacterInfo[playerid][pTog] & TOG_NAME)) { TextDrawShowForPlayer(playerid, TD_IRPName); TextDrawShowForPlayer(playerid, TD_IRPName2); } if(!(CharacterInfo[playerid][pTog] & TOG_LSN)) { TextDrawShowForPlayer(playerid, TD_LSN); TextDrawShowForPlayer(playerid, TD_LSN2); } // Aktualizacja głodu FoodBar[playerid] = CreatePlayerProgressBar(playerid, 548.4, 28.0, 57.7, 4.5, COLOR_GREEN, 100.0); if(!(CharacterInfo[playerid][pTog] & TOG_GLOD)) { ShowPlayerProgressBar(playerid, FoodBar[playerid]); SetPlayerProgressBarValue(playerid, FoodBar[playerid], CharacterInfo[playerid][pGlod]); UpdatePlayerProgressBar(playerid, FoodBar[playerid]); } //włączenie telefonu new phone = CharacterInfo[playerid][pPhone]; if(phone && ItemInfo[phone][iType] == ITEM_TYPE_TELEFON && ItemInfo[phone][iOwnerTyp] == OWNER_PLAYER && ItemInfo[phone][iOwner] == CharacterInfo[playerid][pUID]) { ItemInfo[phone][iUsed] = 1; format(query,sizeof(query),"UPDATE `srv_items` SET `used` = 1 WHERE `uid` = '%d' LIMIT 1", phone); mysql_query(query); } else CharacterInfo[playerid][pPhone] = 0; // Informacje startowe //CC990 new first_string[144]; format(first_string, sizeof(first_string),"** {ffffff}Witaj %s na "DEF_COLOR"SeasonLife.pl!", CharacterInfo[playerid][pGlobalNick]); SendClientMessage(playerid, COLOR_GREEN, first_string); format(first_string, sizeof(first_string),"** {ffffff}Zalogowano się na postać: "DEF_COLOR"%s {ffffff}(ID: %d, UID: %d)", PlayerName2(playerid), playerid, CharacterInfo[playerid][pUID]); SendClientMessage(playerid, COLOR_GREEN, first_string); if(CharacterInfo[playerid][pAdmin]) { switch(CharacterInfo[playerid][pAdmin]) { case 1: format(first_string,sizeof(first_string),"** {FFFFFF}Status konta: {FF9900}Opiekun"); case 2,3,4: format(first_string,sizeof(first_string),"** {FFFFFF}Status konta: {8B00B0}GameMaster"); case 5: format(first_string,sizeof(first_string),"** {FFFFFF}Status konta: {B00000}Administrator"); case 6: format(first_string,sizeof(first_string),"** {FFFFFF}Status konta: {FF0000}Administrator Głуwny"); } SendClientMessage(playerid, COLOR_GREEN, first_string); } else if(IsPlayerPremium(playerid)) SendClientMessage(playerid, COLOR_GREEN, "** {ffffff}Status konta: {FCDF1E}Premium{FFFFFF}."); else SendClientMessage(playerid, COLOR_GREEN, "** {ffffff}Status konta: Użytkownik (brak premium)."); #if defined DEBUG_MODE SendClientMessage(playerid, COLOR_RED, "Tryb testowy aktywny!"); #endif for(new i=1;i<MAX_PLAYER_GROUPS;i++) if(MemberGroup[playerid][i][GroupID] && strlen(GroupInfo[MemberGroup[playerid][i][GroupID]][gNotice])>4) SendClientMessageFormat(playerid, GetGroupColor(MemberGroup[playerid][i][GroupID]), "[GRUPA][%s] Ogłoszenie: %s", GroupInfo[MemberGroup[playerid][i][GroupID]][gTag], GroupInfo[MemberGroup[playerid][i][GroupID]][gNotice]); if(SettingInfo[sPremiumEventDays] && !IsPlayerPremium(playerid)) { SendClientMessageFormat(playerid, COLOR_YELLOW, "[INFO] W związku z trwającym aktualnie eventem otrzymujesz KONTO PREMIUM na okres %d dni.", SettingInfo[sPremiumEventDays]); GivePlayerPremium(playerid, SettingInfo[sPremiumEventDays]); } if(IsPlayerPremium(playerid)) { CharacterInfo[playerid][pNickColor] = COLOR_PREMIUM; SetPlayerColor(playerid, COLOR_PREMIUM); } else { CharacterInfo[playerid][pNickColor] = COLOR_USER; SetPlayerColor(playerid, COLOR_USER); } Attach3DTextLabelToPlayer(NameTags[playerid], playerid, 0.0, 0.0, 0.2); Attach3DTextLabelToPlayer(Description[playerid], playerid, 0.0, 0.0, -0.6); if(!IsPlayerNPC(playerid)) Logged[playerid] = true; SetPlayerMapIcon(playerid, 0, 548.1733, -1277.9405, 17.2482, 55, 0, MAPICON_GLOBAL); //ICONID 10-30 zajęte na cornery for(new d = 0; d<MAX_DOORS_MAPICONS; d++) { if(DOORS_MAPICONS[playerid][d] != -1) DestroyDynamicMapIcon(DOORS_MAPICONS[playerid][d]); DOORS_MAPICONS[playerid][d] = -1; } for(new i = 0; i<_DOOR_COUNT; i++) { if(DoorsInfo[i][dIconID]) { new icon = -1; for(new s = 0; s<MAX_DOORS_MAPICONS; s++) { if(DOORS_MAPICONS[playerid][s] == -1) { icon = s; break; } } DOORS_MAPICONS[playerid][icon] = CreateDynamicMapIcon(DoorsInfo[i][dEnterX], DoorsInfo[i][dEnterY], DoorsInfo[i][dEnterZ], DoorsInfo[i][dIconID], 0, -1, -1, playerid, -1, MAPICON_LOCAL ); } } new gangid; if((gangid = IsPlayerInGroupType(playerid,GROUP_GANG))) for(new i=1;i<MAX_CORNERS;i++) if(CornerInfo[i][cOwner]==gangid) SetPlayerMapIcon(playerid, CornerInfo[i][cIcon], CornerInfo[i][cPosX], CornerInfo[i][cPosY], CornerInfo[i][cPosZ], 23, 0, MAPICON_LOCAL_CHECKPOINT); } } return 1; }