02.10.2015, 00:22
Am I doing something wrong with this? For some reason it's not loading any of the information correctly.
And my sql log
pawn Код:
public LoadHouses()
{
new rows, fields;
cache_get_data(rows, fields);
HouseCount = rows;
for(new i = 1; i <= rows; i++)
{
cache_get_field_content(i, "owner", HouseInfo[i][Owner], g_Handle, 24);
HouseInfo[i][Status] = cache_get_field_content_int(i, "status");
HouseInfo[i][Interior] = cache_get_field_content_int(i, "interior");
HouseInfo[i][Price] = cache_get_field_content_int(i, "price");
HouseInfo[i][XPos] = cache_get_field_content_float(i, "xpos");
HouseInfo[i][YPos] = cache_get_field_content_float(i, "ypos");
HouseInfo[i][ZPos] = cache_get_field_content_float(i, "zpos");
HouseInfo[i][EnterX] = cache_get_field_content_float(i, "enterx");
HouseInfo[i][EnterY] = cache_get_field_content_float(i, "entery");
HouseInfo[i][EnterZ] = cache_get_field_content_float(i, "enterz");
HousePickup[i] = CreatePickup(1273, 1, HouseInfo[i][XPos], HouseInfo[i][YPos], HouseInfo[i][ZPos]);
CreateHouseLabels(i);
}
printf("--- %i houses loaded from the SQL Database. ---", HouseCount);
return 1;
}
Код:
[20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_int - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype [20:08:02] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') [20:08:02] [ERROR] cache_get_field_content_float - invalid datatype