Help Pls : Lost connection to MySQL server during query
#1

Code:
20:50:08] errorid: 2013 | error: Lost connection to MySQL server during query | resultid: -1 | extraid: -1 | callback: NULL | query: UPDATE groups SET groupName = 'Government', groupHQExteriorPosX = '1479.785278', groupHQExteriorPosY = '-1752.154663', groupHQExteriorPosZ = '13.546875', groupHQInteriorID = '3', groupHQLockStatus = '0', groupHQInteriorPosX = '389.451202', groupHQInteriorPosY = '173.810348', groupHQInteriorPosZ = '1008.382812', groupSafeMoney = '35570688', groupSafeMats = '0', groupSafeIron = '1', groupSafeWood = '1', groupSafeSeed = '1', groupSafeWeed = '1', groupMOTD = 'Leader-Lamont will be inactive till Monday have fun and RP till I am back.', groupRankName0 = '(null)', groupRankName1 = 'บอดี้การ์ด', groupRankName2 = 'รัฐมนตรีว่าการกระทรวงการคลัง', groupRankName3 = 'รัฐมนตรีว่าการกระทรวงยุติธรรม', groupRankName4 = 'รัฐมนตรีว่าการกระทรวงกลาโหม', groupRankName5 = 'ผู้ว่าการรัฐบาล', groupRankName6 = 'ประธานาธิบดี', groupRankName7 = '(null)', groupRankName8 = '(null)', groupRankName9 = '(null)', groupRankName10 = '(null)', groupRankName11 = '(null)', groupRankName12 = '(null)', groupRankName13 = 'ผู้ว่าการรัฐบาล', groupRankName14 = 'ประธานาธิบดี', groupSafePosX = '1911.246459', groupSafePosY = '-1759.860351', groupSafePosZ = '15.339500', groupType = '2' WHERE groupID = '4'
Code:
stock saveGroup(const id) {
	if(strlen(groupVariables[id][gGroupName]) >= 1) {
		format(szLargeString, sizeof(szLargeString), "UPDATE groups SET groupName = '%s', groupHQExteriorPosX = '%f', groupHQExteriorPosY = '%f', groupHQExteriorPosZ = '%f'", groupVariables[id][gGroupName], groupVariables[id][gGroupExteriorPos][0], groupVariables[id][gGroupExteriorPos][1], groupVariables[id][gGroupExteriorPos][2]);
		format(szLargeString, sizeof(szLargeString), "%s, groupHQInteriorID = '%d', groupHQLockStatus = '%d', groupHQInteriorPosX = '%f', groupHQInteriorPosY = '%f', groupHQInteriorPosZ = '%f', groupSafeMoney = '%d', groupSafeMats = '%d', groupSafeIron = '%d', groupSafeWood = '%d', groupSafeSeed = '%d', groupSafeWeed = '%d', groupMOTD = '%s'", szLargeString, groupVariables[id][gGroupHQInteriorID],
		groupVariables[id][gGroupHQLockStatus], groupVariables[id][gGroupInteriorPos][0], groupVariables[id][gGroupInteriorPos][1], groupVariables[id][gGroupInteriorPos][2], groupVariables[id][gSafe][0], groupVariables[id][gSafe][1], groupVariables[id][gSafe][2], groupVariables[id][gSafe][3], groupVariables[id][gSafe][4], groupVariables[id][gSafe][5], groupVariables[id][gGroupMOTD]);
		format(szLargeString, sizeof(szLargeString), "%s, groupRankName0 = '%s', groupRankName1 = '%s', groupRankName2 = '%s', groupRankName3 = '%s', groupRankName4 = '%s', groupRankName5 = '%s', groupRankName6 = '%s', groupRankName7 = '%s', groupRankName8 = '%s', groupRankName9 = '%s', groupRankName10 = '%s', groupRankName11 = '%s', groupRankName12 = '%s', groupRankName13 = '%s', groupRankName14 = '%s'", szLargeString,
		groupVariables[id][gGroupRankName0],groupVariables[id][gGroupRankName1], groupVariables[id][gGroupRankName2], groupVariables[id][gGroupRankName3], groupVariables[id][gGroupRankName4], groupVariables[id][gGroupRankName5], groupVariables[id][gGroupRankName6],groupVariables[id][gGroupRankName7],groupVariables[id][gGroupRankName8], groupVariables[id][gGroupRankName9], groupVariables[id][gGroupRankName10], groupVariables[id][gGroupRankName11],
		groupVariables[id][gGroupRankName12], groupVariables[id][gGroupRankName13], groupVariables[id][gGroupRankName14]);
		format(szLargeString, sizeof(szLargeString), "%s, groupSafePosX = '%f', groupSafePosY = '%f', groupSafePosZ = '%f', groupType = '%d' WHERE groupID = '%d'", szLargeString, groupVariables[id][gSafePos][0], groupVariables[id][gSafePos][1], groupVariables[id][gSafePos][2], groupVariables[id][gGroupType], id);
  		mysql_query(szLargeString);
	}
	else {
		return 0;
	}

	return 1;

}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)