25.03.2014, 18:20
Okay, so when I restart my server, the houses don't load and I can't find out why..
pawn Код:
LoadHouses()
{
mysql_function_query(MySQLConnection, "SELECT * FROM `houses`", false, "HouseInformation", "i", THREAD_NO_RESULT);
return true;
}
pawn Код:
forward HouseInformation(houseid);
public HouseInformation(houseid)
{
cache_get_data(rows, fields);
if(rows > 0)
{
for(new i = 0; i < rows; i++)
{
HouseInfo[i][HouseID] = cache_get_row_int(i, 0, MySQLConnection);
cache_get_row(i, 1, HouseInfo[i][Owner], MySQLConnection, 24);
HouseInfo[i][HouseEX] = cache_get_row_float(i, 2, MySQLConnection);
HouseInfo[i][HouseEY] = cache_get_row_float(i, 3, MySQLConnection);
HouseInfo[i][HouseEZ] = cache_get_row_float(i, 4, MySQLConnection);
HouseInfo[i][HouseIX] = cache_get_row_float(i, 5, MySQLConnection);
HouseInfo[i][HouseIY] = cache_get_row_float(i, 6, MySQLConnection);
HouseInfo[i][HouseIZ] = cache_get_row_float(i, 7, MySQLConnection);
HouseInfo[i][Weed] = cache_get_row_int(i, 8, MySQLConnection);
HouseInfo[i][Money] = cache_get_row_int(i, 9, MySQLConnection);
HouseInfo[i][Locked] = cache_get_row_int(i, 10, MySQLConnection);
HouseInfo[i][Price] = cache_get_row_int(i, 11, MySQLConnection);
HouseInfo[i][Interior] = cache_get_row_int(i, 12, MySQLConnection);
}
}
return true;
}