12.06.2015, 22:02
Idk wtf is happening with me
Here is the full code I've made
And I load it like this
And it printed me
And it isn't like that in the database
Here is the full code I've made
PHP код:
#define MAX_HOUSES 1000
enum hInfo
{
HouseID,
Float:EntranceX,
Float:EntranceY,
Float:EntranceZ,
Float:ExitX,
Float:ExitY,
Float:ExitZ,
InsideInt,
owner[128],
owned,
HousePrice,
HouseText[128]
};
new HouseInfo[MAX_HOUSES][hInfo];
PHP код:
new Cache: result = mysql_query(1, "SELECT COUNT(*) FROM houses");
printf("%i house(s) loaded", cache_get_row_int(0, 0));
cache_delete(result);
for(new x = 0; x < MAX_HOUSES; x++)
{
HouseInfo[x][HouseID] = cache_get_field_content_int(0, "id");
HouseInfo[x][EntranceX] = cache_get_field_content_float(0, "EntranceX");
HouseInfo[x][EntranceY] = cache_get_field_content_float(0, "EntranceY");
HouseInfo[x][EntranceZ] = cache_get_field_content_float(0, "EntranceZ");
HouseInfo[x][ExitX] = cache_get_field_content_float(0, "ExitX");
HouseInfo[x][ExitY] = cache_get_field_content_float(0, "ExitY");
HouseInfo[x][ExitZ] = cache_get_field_content_float(0, "ExitZ");
HouseInfo[x][InsideInt] = cache_get_field_content_int(0, "InsideInt");
cache_get_field_content(0, "owner", HouseInfo[x][owner]);
HouseInfo[x][owned] = cache_get_field_content_int(0, "owned");
HouseInfo[x][HousePrice] = cache_get_field_content_int(0, "price");
cache_get_field_content(0, "text", HouseInfo[x][HouseText]);
Create3DTextLabel(HouseInfo[x][HouseText], COLOR_GREEN, HouseInfo[x][EntranceX], HouseInfo[x][EntranceY], HouseInfo[x][EntranceZ], 30, 0, 1);
printf("Info x = %f\nInfo y = %f\nInfo z = %f",HouseInfo[x][EntranceX], HouseInfo[x][EntranceY], HouseInfo[x][EntranceZ]);
}
Код:
x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 x info = 0.0000 y info = 0.0000 z info = 0.0000 //Till forever