16.01.2019, 11:16
(
Последний раз редактировалось Calisthenics; 16.01.2019 в 12:26.
)
https://sampwiki.blast.hk/wiki/MySQL/R3..._field_content
https://sampwiki.blast.hk/wiki/MySQL/R3...ld_content_int
https://sampwiki.blast.hk/wiki/MySQL/R3..._content_float
First parameter is row, not connection handle.
The loop is wrong, it must start from index 0 until rows-1 otherwise you are trying to retrieve data from an invalid row.
Strings are passed by reference, the function does not return any specific value. You will need to use the length parameter when using enum-arrays.
https://sampwiki.blast.hk/wiki/MySQL/R3...ld_content_int
https://sampwiki.blast.hk/wiki/MySQL/R3..._content_float
First parameter is row, not connection handle.
The loop is wrong, it must start from index 0 until rows-1 otherwise you are trying to retrieve data from an invalid row.
Strings are passed by reference, the function does not return any specific value. You will need to use the length parameter when using enum-arrays.
pawn Код:
for(new id=0, rows = cache_get_row_count(); id<rows; id++)
{
HouseInfo[id][ID]= cache_get_field_content_int(id, "ID", dbhandle);
cache_get_field_content(id, "Owner", HouseInfo[id][Owner], dbhandle, MAX_PLAYER_NAME);
HouseInfo[id][HouseX]= cache_get_field_content_float(id, "HX", dbhandle);
...
}

