24.04.2016, 13:52
I'm having lag due to this timer "Globalplayerloop2"
I've disabled it and nothing lagged anymore, so it must be this one.
I've also found in the mysql_error.log some errors about it.
These are the errors.
I really need this one fixed ASAP. Thanks.
I've disabled it and nothing lagged anymore, so it must be this one.
I've also found in the mysql_error.log some errors about it.
These are the errors.
Код:
[16:44:30] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:30] [ERROR] cache_get_field_content_int - invalid datatype [16:44:30] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:30] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:30] [ERROR] cache_get_field_content_int - invalid datatype [16:44:30] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:30] [ERROR] cache_get_field_content_int - invalid datatype [16:44:30] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:35] [ERROR] cache_get_field_content_int - invalid datatype [16:44:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:35] [ERROR] cache_get_field_content_int - invalid datatype [16:44:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:35] [ERROR] cache_get_field_content_int - invalid datatype [16:44:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:36] [ERROR] cache_get_field_content_int - invalid datatype [16:44:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:36] [ERROR] cache_get_field_content_int - invalid datatype [16:44:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:41] [ERROR] cache_get_field_content_int - invalid datatype [16:44:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:42] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:42] [ERROR] cache_get_field_content_int - invalid datatype [16:44:42] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:42] [ERROR] cache_get_field_content_int - invalid datatype [16:44:42] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:42] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:42] [ERROR] cache_get_field_content_int - invalid datatype [16:44:42] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:44:42] [ERROR] cache_get_field_content_int - invalid datatype [16:44:42] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:54] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:54] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:54] [ERROR] cache_get_field_content_int - invalid datatype [16:46:54] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:54] [ERROR] cache_get_field_content_int - invalid datatype [16:46:54] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:54] [ERROR] cache_get_field_content_int - invalid datatype [16:46:54] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:59] [ERROR] cache_get_field_content_int - invalid datatype [16:46:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:59] [ERROR] cache_get_field_content_int - invalid datatype [16:46:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:46:59] [ERROR] cache_get_field_content_int - invalid datatype [16:46:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:04] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:05] [ERROR] cache_get_field_content_int - invalid datatype [16:47:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:05] [ERROR] cache_get_field_content_int - invalid datatype [16:47:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:05] [ERROR] cache_get_field_content_int - invalid datatype [16:47:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:11] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:11] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:11] [ERROR] cache_get_field_content_int - invalid datatype [16:47:11] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:11] [ERROR] cache_get_field_content_int - invalid datatype [16:47:11] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:11] [ERROR] cache_get_field_content_int - invalid datatype [16:47:11] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:16] [ERROR] cache_get_field_content_int - invalid datatype [16:47:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:16] [ERROR] cache_get_field_content_int - invalid datatype [16:47:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:47:16] [ERROR] cache_get_field_content_int - invalid datatype [16:47:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:35] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:35] [ERROR] cache_get_field_content_int - invalid datatype [16:48:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:36] [ERROR] cache_get_field_content_int - invalid datatype [16:48:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:36] [ERROR] cache_get_field_content_int - invalid datatype [16:48:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:36] [ERROR] cache_get_field_content_int - invalid datatype [16:48:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:40] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:40] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:40] [ERROR] cache_get_field_content_int - invalid datatype [16:48:40] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:40] [ERROR] cache_get_field_content_int - invalid datatype [16:48:40] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:40] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:41] [ERROR] cache_get_field_content_int - invalid datatype [16:48:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:41] [ERROR] cache_get_field_content_int - invalid datatype [16:48:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] cache_get_field_content_int - invalid datatype [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] cache_get_field_content_int - invalid datatype [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] cache_get_field_content_int - invalid datatype [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:51] [ERROR] cache_get_field_content_int - invalid datatype [16:48:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] cache_get_field_content_int - invalid datatype [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] cache_get_field_content_int - invalid datatype [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] cache_get_field_content_int - invalid datatype [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:48:56] [ERROR] cache_get_field_content_int - invalid datatype [16:48:56] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] cache_get_field_content_int - invalid datatype [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] cache_get_field_content_int - invalid datatype [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] cache_get_field_content_int - invalid datatype [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:53] [ERROR] cache_get_field_content_int - invalid datatype [16:49:53] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] cache_get_field_content_int - invalid datatype [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] cache_get_field_content_int - invalid datatype [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] cache_get_field_content_int - invalid datatype [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [16:49:59] [ERROR] cache_get_field_content_int - invalid datatype [16:49:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
Код:
public globalPlayerLoop2() { new text69[256]; new text6969[256]; new text68[256]; new pula; new Cache: result7 = mysql_query (handle, "SELECT * FROM `playeraccounts` ORDER BY `playeraccounts`.`playerID` ASC"); for ( new i, j = cache_get_row_count ( ); i != j; ++i ) { cache_get_field_content(i, "text", text69); cache_get_field_content(i, "text2", text6969); pula = strval(text6969); if(!isnull(text69) && pula >= 1) { format(szMessage, sizeof(szMessage), text69); SCMTA(COLOR_LIGHTRED, szMessage); format(text68, 256, "UPDATE playeraccounts SET text2 = 0 WHERE playerID = %d",pula); mysql_tquery(handle, text68); } } cache_delete(result7); foreach(Player, x) { if(IsPlayerConnected(x)) { new samp[1000]; mysql_format(handle, samp, sizeof(samp), "SELECT newemail FROM playeraccounts WHERE playeraccounts.playerID = '%d' limit 1",playerVariables[x][pInternalID]); new Cache: result690 = mysql_query(handle, samp); new query2[256]; cache_get_field_content(0, "newemail", query2); mail[x] = strval(query2); cache_delete(result690); if(mail[x] == 1) { SCM(x,COLOR_YELLOW, "{f2a836}** {FFFF00}Ai o notificare noua. Foloseste /notifications pentru a o vedea. {f2a836}**"); format(samp, sizeof(samp), "UPDATE playeraccounts SET newemail = 0 WHERE playerID = %d",playerVariables[x][pInternalID]); mysql_tquery(handle,samp); mail[x] = 0; } new samp2[1000]; mysql_format(handle, samp2, sizeof(samp2), "SELECT deconnect FROM playeraccounts WHERE playeraccounts.playerID = '%d' limit 1",playerVariables[x][pInternalID]); new Cache: result6900 = mysql_query(handle, samp2); decon[x] = cache_get_field_content_int(0, "deconnect"); cache_delete(result6900); if(decon[x] == 1) { SCM(x,COLOR_RED, "* You have been deconnected from user panel."); format(samp2, sizeof(samp2), "UPDATE playeraccounts SET deconnect = 0 WHERE playerID = %d",playerVariables[x][pInternalID]); mysql_tquery(handle,samp2); decon[x] = 0; SetTimerEx("kick2", 3000, 0, "d", x); } new samp3[1000]; mysql_format(handle, samp3, sizeof(samp3), "SELECT * FROM playeraccounts WHERE playeraccounts.playerID = '%d' limit 1",playerVariables[x][pInternalID]); new Cache: resultms = mysql_query(handle, samp3); new query6[256], query7[256]; warn[x] = cache_get_field_content_int(0, "playerPanelWarnKick"); cache_get_field_content(0, "playerPanelWarnReason", query6); cache_get_field_content(0, "playerPanelSender", query7); format(warnreason[x], 126, query6); format(warnsender[x], 126, query7); cache_delete(resultms); if(warn[x] == 1) { new str[256]; SCM(x,COLOR_RED, "* You have been warned by an admin."); format(samp3, sizeof(samp3), "UPDATE playeraccounts SET playerPanelWarnKick = 0 WHERE playerID = %d",playerVariables[x][pInternalID]); mysql_tquery(handle,samp3); new query[256], query0[512]; format(szMessage, sizeof(szMessage), "%s has been warned by %s, reason: %s.", GetName(x), warnsender[x], warnreason[x]); format(query, sizeof(query), "INSERT INTO lastpunish (text, playerID, playerName) VALUES ('%s', '%d', '%s')",szMessage, playerVariables[x][pInternalID], GetName(x)); mysql_tquery(handle,query); mysql_format(handle, query0, 512, "UPDATE `playeraccounts` SET `playerVIP` = `playerVIP`+1 WHERE `playerID` = '%d'", playerVariables[x][pInternalID]); mysql_tquery(handle,query0); format(str, sizeof(str), "AdmPanel: %s has been warned by %s, reason: %s.", GetName(x), warnsender[x], warnreason[x]); SendClientMessageToAll(COLOR_LIGHTRED, str); warn[x] = 0; playerVariables[x][pWarns]++; savePlayerData(x); SetTimerEx("kick2", 2000, 0, "d", x); } new samp4[1000]; mysql_format(handle, samp4, sizeof(samp4), "SELECT * FROM playeraccounts WHERE playeraccounts.playerID = '%d' limit 1",playerVariables[x][pInternalID]); new Cache: resultms22 = mysql_query(handle, samp4); new bReason[512], cid; clan[x] = cache_get_field_content_int(0, "playerBoughtClan"); cid = cache_get_field_content_int(0, "playerClan"); cache_get_field_content(0, "playerBoughtReason", bReason); cache_delete(resultms22); if(clan[x] == 1) { SCM(x,COLOR_RED, "Thank you for purchasing a clan from our panel."); SCM(x,COLOR_RED, "For security reasons, you got kicked to save all of our important data."); SCM(x,COLOR_RED, "A total of 100 premium points have been extracted from your account."); format(samp4, sizeof(samp4), "UPDATE playeraccounts SET playerBoughtClan = 0 WHERE playerID = %d",playerVariables[x][pInternalID]); mysql_tquery(handle,samp4); new query0[512], str[256]; mysql_format(handle, query0, 512, "UPDATE `playeraccounts` SET `playerCarWeapon5` = `playerCarWeapon5`-100 WHERE `playerID` = '%d'", playerVariables[x][pInternalID]); mysql_tquery(handle,query0); format(str, sizeof(str), "%s", bReason); foreach(Player, mz) { if(playerVariables[mz][pAdminLevel] >= 6) { SCM(mz, COLOR_DARKRED, str); } } clan[x] = 0; playerVariables[x][pPremiumPoints] -= 100; playerVariables[x][pClan] = cid; playerVariables[x][pClanRank] = 7; playerVariables[x][pClanDays] = 0; savePlayerData(x); SetTimerEx("kick2", 2000, 0, "d", x); } new samp5[1000]; mysql_format(handle, samp5, sizeof(samp5), "SELECT * FROM playeraccounts WHERE playeraccounts.playerID = '%d' limit 1",playerVariables[x][pInternalID]); new Cache: resultms72 = mysql_query(handle, samp5); rreset[x] = cache_get_field_content_int(0, "playerPanelReset"); cache_delete(resultms72); if(rreset[x] == 1) { SCM(x,COLOR_RED, "Cont resetat. Nu te mai folosi de bug-uri data viitoare."); format(samp5, sizeof(samp5), "UPDATE playeraccounts SET playerPanelReset = 0 WHERE playerID = %d",playerVariables[x][pInternalID]); mysql_tquery(handle,samp5); new str2[256]; format(str2, sizeof(str2), "AdmPanel: %s's account has been reseted.", GetName(x)); foreach(Player, asd) { if(playerVariables[asd][pAdminLevel] >= 6) { SCM(asd, COLOR_DARKRED, str2); } } rreset[x] = 0; playerVariables[x][pMoney] = 0; playerVariables[x][pBankMoney] = 0; playerVariables[x][pCarModel1] = 0; playerVariables[x][pCarModel2] = 0; playerVariables[x][pCarModel3] = 0; playerVariables[x][pCarModel4] = 0; playerVariables[x][pHouse] = 0; playerVariables[x][pBusiness] = 0; savePlayerData(x); SetTimerEx("kick2", 2000, 0, "d", x); } new samp6[1000]; mysql_format(handle, samp6, sizeof(samp6), "SELECT * FROM playeraccounts WHERE playeraccounts.playerID = '%d' limit 1",playerVariables[x][pInternalID]); new Cache: resultms77 = mysql_query(handle, samp6); new banreason[256]; panelban[x] = cache_get_field_content_int(0, "playerPanelWarnKick"); cache_get_field_content(0, "playerPanelWarnReason", banreason); cache_delete(resultms77); if(panelban[x] == 3) { SCM(x,COLOR_RED, "Ai fost banat decatre un administrator. (Panel)"); format(samp6, sizeof(samp6), "UPDATE playeraccounts SET playerPanelWarnKick = 0 WHERE playerID = %d",playerVariables[x][pInternalID]); mysql_tquery(handle,samp6); new str4[256]; format(str4, sizeof(str4), "%s", banreason); SendClientMessageToAll(COLOR_LIGHTRED, str4); panelban[x] = 0; playerVariables[x][pBanned] = 1; savePlayerData(x); SetTimerEx("kick2", 2000, 0, "d", x); } if(panelban[x] == 4) { SCM(x,COLOR_RED, "Ai fost banat decatre un administrator. (Panel)"); format(samp6, sizeof(samp6), "UPDATE playeraccounts SET playerPanelWarnKick = 0 WHERE playerID = %d",playerVariables[x][pInternalID]); mysql_tquery(handle,samp6); new str4[256]; format(str4, sizeof(str4), "%s", banreason); SendClientMessageToAll(COLOR_LIGHTRED, str4); panelban[x] = 0; savePlayerData(x); SetTimerEx("kick2", 2000, 0, "d", x); } } } }