02.10.2010, 07:43 
	
	
	
		Hello, Iam busy with a MySQL Housing system, But i have a problem...,
When the server shuts down, The houses get saved, But..
It returns everything in the Houses table too 0.0,
Here's my UpdateHouses:
Maybe one of you guys know the problem... :S
Greetings, Gforcez
	
	
	
When the server shuts down, The houses get saved, But..
It returns everything in the Houses table too 0.0,
Here's my UpdateHouses:
Код:
UpdateHouses()
{
	RefreshMySQL();
	
	new string[512];
    for(new i; i < MAX_HOUSES; i++)
	{
 		format(string, sizeof(string), "UPDATE `houses` SET hDiscription='%s', hEnterX='%.4f', hEnterY='%.4f', hEnterZ='%.4f', hExitX='%.4f' WHERE hID=%d", HouseInfo[i][hDiscription], HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ], HouseInfo[i][hExitX], HouseInfo[i][hID]);
        mysql_query(string);
 		format(string, sizeof(string), "UPDATE `houses` SET hExitY='%.4f', hExitZ='%.4f', hVecPosX='%.4f', hVecPosY='%.4f', hVecPosZ='%.4f' WHERE hID=%d", HouseInfo[i][hExitY], HouseInfo[i][hExitZ], HouseInfo[i][hVecPosX], HouseInfo[i][hVecPosY], HouseInfo[i][hVecPosZ], HouseInfo[i][hID]);
        mysql_query(string);
 		format(string, sizeof(string), "UPDATE `houses` SET hVecColor1='%d', hVecColor2='%d', hInt='%d', hVir='%d', hPrice='%d' WHERE hID=%d", HouseInfo[i][hVecColor1], HouseInfo[i][hVecColor2], HouseInfo[i][hInt], HouseInfo[i][hVir], HouseInfo[i][hPrice] , HouseInfo[i][hID]);
        mysql_query(string);
 		format(string, sizeof(string), "UPDATE `houses` SET hOwned='%d', hOwner='%s', hLocked='%d' WHERE hID=%d", HouseInfo[i][hOwned], HouseInfo[i][hOwner], HouseInfo[i][hLocked], HouseInfo[i][hID]);
        mysql_query(string);
	}
	mysql_free_result();
}
Greetings, Gforcez

