19.09.2013, 22:19
I really don't get this, someone please help.
House loading:
Call back:
Then in my mysql_log it is now:
But as you can see. 0-17 is correct on the cache_get_rows.
House loading:
pawn Код:
stock Houses()
{
mysql_function_query(dbHandle, "SELECT * FROM `Houses`", true, "LoadHouses", "");
}
pawn Код:
public LoadHouses()
{
new string[100], query[100], savedata[50];
new houseid = 1;
new rows, fields;
cache_get_data(rows, fields, dbHandle);
while(mysql_fetch_row_format(query,"|"))
{
HouseInfo[houseid][hID] = cache_get_row_int(0, 0, dbHandle);
cache_get_row(0, 1, savedata); HouseInfo[houseid][hAddress] = strval(savedata);
cache_get_row(0, 2, savedata); HouseInfo[houseid][hOwner] = strval(savedata);
HouseInfo[houseid][hPrice] = cache_get_row_int(0, 3, dbHandle);
HouseInfo[houseid][hType] = cache_get_row_int(0, 4, dbHandle);
HouseInfo[houseid][hVirtualWorld] = cache_get_row_int(0, 5, dbHandle);
HouseInfo[houseid][hInterior] = cache_get_row_int(0, 6, dbHandle);
HouseInfo[houseid][hPosX] = cache_get_row_float(0, 7, dbHandle);
HouseInfo[houseid][hPosY] = cache_get_row_float(0, 8, dbHandle);
HouseInfo[houseid][hPosZ] = cache_get_row_float(0, 9, dbHandle);
HouseInfo[houseid][hEnterX] = cache_get_row_float(0, 10, dbHandle);
HouseInfo[houseid][hEnterY] = cache_get_row_float(0, 11, dbHandle);
HouseInfo[houseid][hEnterZ] = cache_get_row_float(0, 12, dbHandle);
HouseInfo[houseid][hEnterA] = cache_get_row_float(0, 13, dbHandle);
HouseInfo[houseid][hExitX] = cache_get_row_float(0, 14, dbHandle);
HouseInfo[houseid][hExitY] = cache_get_row_float(0, 15, dbHandle);
HouseInfo[houseid][hExitZ] = cache_get_row_float(0, 16, dbHandle);
HouseInfo[houseid][hExitA] = cache_get_row_float(0, 17, dbHandle);
HouseInfo[houseid][hPickUp] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], 0);
format(string, sizeof(string), "ID: %d\n"Pink"Address"White": %s\n"Pink"Owner"White": %s\n"Pink"Price"White": $%d", HouseInfo[houseid][hID], HouseInfo[houseid][hAddress], HouseInfo[houseid][hOwner], HouseInfo[houseid][hPrice]);
HouseInfo[houseid][hText] = CreateDynamic3DTextLabel(string, -1, HouseInfo[houseid][hPosX], HouseInfo[houseid][hPosY], HouseInfo[houseid][hPosZ], 20.0);
format(string, sizeof(string), "House ID: %d, Price: %d, Address: %s, Owner: %s", HouseInfo[houseid][hID], HouseInfo[houseid][hPrice], HouseInfo[houseid][hAddress], HouseInfo[houseid][hOwner]);
printf(string);
houseid++;
}
printf("All houses have been successfully loaded.");
return 1;
}
Then in my mysql_log it is now:
Код:
[23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('0') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('1') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('2') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('3') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('4') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('5') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('6') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('7') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('8') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('9') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('10') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('11') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('12') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('13') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('14') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('15') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('16') [23:16:23] [WARNING] CMySQLResult::GetRowData - invalid row ('3') or field index ('17')