23.10.2014, 11:19
Hello!
When I load my houses, values start well in the variables.
But when I save, it resets the values of the variables to 0 ...
And that ALL the variables.
Here is my code, it may be a problem ...
Thx
When I load my houses, values start well in the variables.
But when I save, it resets the values of the variables to 0 ...
And that ALL the variables.
Here is my code, it may be a problem ...
Thx
pawn Код:
forward SaveSQLHouse(idhouse);
public SaveSQLHouse(idhouse)
{
new query[256];
mysql_format(MySQLConnect, query, 256, "UPDATE houses SET EntreeX = '%f', EntreeY = '%f', EntreeZ = '%f', SortieX = '%f', SortieY = '%f', SortieZ = '%f' WHERE id = %d",
HouseInfo[idhouse][EntreeX],
HouseInfo[idhouse][EntreeY],
HouseInfo[idhouse][EntreeZ],
HouseInfo[idhouse][SortieX],
HouseInfo[idhouse][SortieY],
HouseInfo[idhouse][SortieZ],
idhouse);
mysql_tquery(MySQLConnect, query);
mysql_format(MySQLConnect, query, 256, "UPDATE houses SET LocationActive = %d, Proprio = '%s', Prix = %d, MapIcone = %d, Inte = %d, Locked = %d, Achete = %d, IntX = %d, VW = %d WHERE id = %d",
HouseInfo[idhouse][LocationActive],
HouseInfo[idhouse][Proprio],
HouseInfo[idhouse][Prix],
HouseInfo[idhouse][MapIcone],
HouseInfo[idhouse][Inte],
HouseInfo[idhouse][Locked],
HouseInfo[idhouse][Achete],
HouseInfo[idhouse][IntX],
HouseInfo[idhouse][VW],
idhouse);
mysql_tquery(MySQLConnect, query);
mysql_format(MySQLConnect, query, 256, "UPDATE houses SET LocationPrix = %d, Description = '%s' WHERE id = %d",
HouseInfo[idhouse][LocationPrix],
HouseInfo[idhouse][Description],
idhouse);
mysql_tquery(MySQLConnect, query);
return 1;
}