public LoadProperty()
{
for (new idx = 0, rows = cache_get_row_count(); idx != rows; ++idx)
{
if (idx == sizeof (HouseInfo)) break;
HouseInfo[idx][hEntrancex] = cache_get_field_content_float(idx, "hEntrancex");
HouseInfo[idx][hEntrancey] = cache_get_field_content_float(idx, "hEntrancey");
HouseInfo[idx][hEntrancez] =cache_get_field_content_float(idx, "hEntrancez");
HouseInfo[idx][hExitx] = cache_get_field_content_float(idx, "hExitx");
HouseInfo[idx][hExity] = cache_get_field_content_float(idx, "hExity");
HouseInfo[idx][hExitz] = cache_get_field_content_float(idx, "hExitz");
HouseInfo[idx][hHealthx] = cache_get_field_content_int(idx, "hHealthx");
HouseInfo[idx][hHealthy] = cache_get_field_content_int(idx, "hHealthy");
HouseInfo[idx][hHealthz] = cache_get_field_content_int(idx, "hHealthz");
HouseInfo[idx][hArmourx] = cache_get_field_content_int(idx, "hArmourx");
HouseInfo[idx][hArmoury] = cache_get_field_content_int(idx, "hArmoury");
HouseInfo[idx][hArmourz] = cache_get_field_content_int(idx, "hArmourz");
cache_get_field_content(idx, "hOwner", HouseInfo[idx][hOwner], 1, MAX_PLAYER_NAME);
cache_get_field_content(idx, "hDiscription", HouseInfo[idx][hDiscription], 128);
HouseInfo[idx][hValue] = cache_get_field_content_int(idx, "hValue");
HouseInfo[idx][hHel] = cache_get_field_content_int(idx, "hHel");
HouseInfo[idx][hArm] = cache_get_field_content_int(idx, "hArm");
HouseInfo[idx][hInt] = cache_get_field_content_int(idx, "hInt");
HouseInfo[idx][hLock] = cache_get_field_content_int(idx, "hLock");
HouseInfo[idx][hOwned] = cache_get_field_content_int(idx, "hOwned");
HouseInfo[idx][hRooms] =cache_get_field_content_int(idx, "hRooms");
HouseInfo[idx][hRent] = cache_get_field_content_int(idx, "hRent");
HouseInfo[idx][hRentabil] = cache_get_field_content_int(idx, "hRentabil");
HouseInfo[idx][hTakings] = cache_get_field_content_int(idx, "hTakings");
HouseInfo[idx][hDate] = cache_get_field_content_int(idx, "hDate");
HouseInfo[idx][hLevel] = cache_get_field_content_int(idx, "hLevel");
HouseInfo[idx][hWorld] = cache_get_field_content_int(idx, "hWorld");
HouseInfo[idx][hSecurity] = cache_get_field_content_int(idx, "hSecurity");
HouseInfo[idx][hCoffre] = cache_get_field_content_int(idx, "hCoffre");
Create3DTextLabel(HouseInfo[idx][hDiscription],0xB40100FF, HouseInfo[idx][hEntrancex],HouseInfo[idx][hEntrancey],HouseInfo[idx][hEntrancez]+1,20,0);
printf("HouseInfo:%d Owner:%s hTakings %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings]);
}
}
new rows = cache_get_row_count();
printf("rows: %i", rows);
for (new idx; idx != rows; ++idx)
public LoadProperty()
{
//I DONT KNOW YOUR 'MAX_HOUSES'
new HouseInfo[MAX_HOUSES];
for (new idx = 0, idx != cache_get_row_count() + 1; idx++)
{
HouseInfo[idx][hEntrancex] = cache_get_field_content_float(idx, "hEntrancex");
HouseInfo[idx][hEntrancey] = cache_get_field_content_float(idx, "hEntrancey");
HouseInfo[idx][hEntrancez] =cache_get_field_content_float(idx, "hEntrancez");
HouseInfo[idx][hExitx] = cache_get_field_content_float(idx, "hExitx");
HouseInfo[idx][hExity] = cache_get_field_content_float(idx, "hExity");
HouseInfo[idx][hExitz] = cache_get_field_content_float(idx, "hExitz");
HouseInfo[idx][hHealthx] = cache_get_field_content_int(idx, "hHealthx");
HouseInfo[idx][hHealthy] = cache_get_field_content_int(idx, "hHealthy");
HouseInfo[idx][hHealthz] = cache_get_field_content_int(idx, "hHealthz");
HouseInfo[idx][hArmourx] = cache_get_field_content_int(idx, "hArmourx");
HouseInfo[idx][hArmoury] = cache_get_field_content_int(idx, "hArmoury");
HouseInfo[idx][hArmourz] = cache_get_field_content_int(idx, "hArmourz");
cache_get_field_content(idx, "hOwner", HouseInfo[idx][hOwner], 1, MAX_PLAYER_NAME);
cache_get_field_content(idx, "hDiscription", HouseInfo[idx][hDiscription], 128);
HouseInfo[idx][hValue] = cache_get_field_content_int(idx, "hValue");
HouseInfo[idx][hHel] = cache_get_field_content_int(idx, "hHel");
HouseInfo[idx][hArm] = cache_get_field_content_int(idx, "hArm");
HouseInfo[idx][hInt] = cache_get_field_content_int(idx, "hInt");
HouseInfo[idx][hLock] = cache_get_field_content_int(idx, "hLock");
HouseInfo[idx][hOwned] = cache_get_field_content_int(idx, "hOwned");
HouseInfo[idx][hRooms] =cache_get_field_content_int(idx, "hRooms");
HouseInfo[idx][hRent] = cache_get_field_content_int(idx, "hRent");
HouseInfo[idx][hRentabil] = cache_get_field_content_int(idx, "hRentabil");
HouseInfo[idx][hTakings] = cache_get_field_content_int(idx, "hTakings");
HouseInfo[idx][hDate] = cache_get_field_content_int(idx, "hDate");
HouseInfo[idx][hLevel] = cache_get_field_content_int(idx, "hLevel");
HouseInfo[idx][hWorld] = cache_get_field_content_int(idx, "hWorld");
HouseInfo[idx][hSecurity] = cache_get_field_content_int(idx, "hSecurity");
HouseInfo[idx][hCoffre] = cache_get_field_content_int(idx, "hCoffre");
Create3DTextLabel(HouseInfo[idx][hDiscription],0xB40100FF, HouseInfo[idx][hEntrancex],HouseInfo[idx][hEntrancey],HouseInfo[idx][hEntrancez]+1,20,0);
printf("HouseInfo:%d Owner:%s hTakings %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings]);
}
}
Are you sure there're rows in the table? What does it print to the console/server log?
pawn Код:
|