Function not executing -
Jack_Leslie - 01.10.2014
Whenever I call this it doesn't execute, no line's inside it at all execute..
pawn Код:
public saveHouse(i)
{
new query[2056];
mysql_format(propertiesLine, query, sizeof(query), "UPDATE `houses` SET cID='%d', Created='%d', Address='%e', Owner='%e', Owned='%d', Locked='%d'",\
HouseData[i][cID], HouseData[i][Created], HouseData[i][Address], HouseData[i][Owner], HouseData[i][Owned], HouseData[i][Locked]);
mysql_format(propertiesLine, query, sizeof(query), "%s, hX='%f', hY='%f', hZ='%f', hA='%f', signX='%f', signY='%f', signZ='%f', signA='%f'",\
query, HouseData[i][hX], HouseData[i][hY], HouseData[i][hZ], HouseData[i][hA], HouseData[i][signX], HouseData[i][signY], HouseData[i][signZ], HouseData[i][signA]);
mysql_format(propertiesLine, query, sizeof(query), "%s, Level='%d', Value='%d', ForSale='%d', SalePrice='%d', Rent='%d', RentPrice='%d' WHERE cID='%d'",\
query, HouseData[i][Level], HouseData[i][Value], HouseData[i][ForSale], HouseData[i][SalePrice], HouseData[i][Rent], HouseData[i][RentPrice], i);
mysql_tquery(propertiesLine, query, "", "");
return 1;
}
Re: Function not executing -
Pottus - 01.10.2014
Your obviously not calling the function or your queries are bad
stick in a print() function print("MYFUNCTION::CALLED"); and see if it's called if not then the issue is elsewhere.
Re: Function not executing -
Jack_Leslie - 01.10.2014
I am calling it.......... can't believe you even said that....
pawn Код:
public saveHouse(i)
{
print("1");
new query[2056];
print("2");
mysql_format(propertiesLine, query, sizeof(query), "UPDATE `houses` SET cID='%d', Created='%d', Address='%e', Owner='%e', Owned='%d', Locked='%d'",\
HouseData[i][cID], HouseData[i][Created], HouseData[i][Address], HouseData[i][Owner], HouseData[i][Owned], HouseData[i][Locked]);
print("3");
mysql_format(propertiesLine, query, sizeof(query), "%s, hX='%f', hY='%f', hZ='%f', hA='%f', signX='%f', signY='%f', signZ='%f', signA='%f'",\
query, HouseData[i][hX], HouseData[i][hY], HouseData[i][hZ], HouseData[i][hA], HouseData[i][signX], HouseData[i][signY], HouseData[i][signZ], HouseData[i][signA]);
print("4");
mysql_format(propertiesLine, query, sizeof(query), "%s, Level='%d', Value='%d', ForSale='%d', SalePrice='%d', Rent='%d', RentPrice='%d' WHERE cID='%d'",\
query, HouseData[i][Level], HouseData[i][Value], HouseData[i][ForSale], HouseData[i][SalePrice], HouseData[i][Rent], HouseData[i][RentPrice], i);
mysql_tquery(propertiesLine, query, "", "");
print("5");
return 1;
}
It got to 1.