14.06.2015, 11:08
I made it like that and nothing
And it printed
And there are 148 house in the table ?!
PHP код:
new Cache: result = mysql_query(1, "SELECT * FROM houses");
for(new x, j = cache_get_row_count(); x != j; ++x)
{
HouseInfo[x][HouseID] = cache_get_field_content_int(x, "id");
HouseInfo[x][EntranceX] = cache_get_field_content_float(x, "EntranceX");
HouseInfo[x][EntranceY] = cache_get_field_content_float(x, "EntranceY");
HouseInfo[x][EntranceZ] = cache_get_field_content_float(x, "EntranceZ");
HouseInfo[x][ExitX] = cache_get_field_content_float(x, "ExitX");
HouseInfo[x][ExitY] = cache_get_field_content_float(x, "ExitY");
HouseInfo[x][ExitZ] = cache_get_field_content_float(x, "ExitZ");
HouseInfo[x][InsideInt] = cache_get_field_content_int(x, "InsideInt");
cache_get_field_content(x, "owner", HouseInfo[x][owner], 1, MAX_PLAYER_NAME);
HouseInfo[x][owned] = cache_get_field_content_int(x, "owned");
HouseInfo[x][HousePrice] = cache_get_field_content_int(x, "price");
cache_get_field_content(x, "text", HouseInfo[x][HouseText]);
Create3DTextLabel(HouseInfo[x][HouseText], COLOR_GREEN, HouseInfo[x][EntranceX], HouseInfo[x][EntranceY], HouseInfo[x][EntranceZ], 30, 0, 1);
mysql_log(LOG_ALL);
printf("x = %f\ny = %f\nz = %f",HouseInfo[x][EntranceX], HouseInfo[x][EntranceY], HouseInfo[x][EntranceZ]);
cache_delete(result);
}
}
Код:
13:12:31] x = 1419.949951 y = -1640.239990 z = 13.546899 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 [13:12:31] x = 0.000000 y = 0.000000 z = 0.000000 //and more