13.06.2015, 09:46
You delete the result before using cache functions. Place:
at the end (after the loop).
Also I said in your previous thread that if you want to count to use COUNT(*) but selecting all data is different ("SELECT * FROM houses").
You need to loop until rows returned (cache_get_row_count) and not until MAX_HOUSES.
In these:
Replace "0" with "x".
Last in cache_get_field_content and enum-array, you need to specify the length:
and replace in your enum with:
pawn Код:
cache_delete(result);
Also I said in your previous thread that if you want to count to use COUNT(*) but selecting all data is different ("SELECT * FROM houses").
You need to loop until rows returned (cache_get_row_count) and not until MAX_HOUSES.
In these:
pawn Код:
cache_get_field_content_int(0, ...
cache_get_field_content_float(0, ...
cache_get_field_content(0, ...
Last in cache_get_field_content and enum-array, you need to specify the length:
pawn Код:
cache_get_field_content(x, "owner", HouseInfo[x][owner], 1, MAX_PLAYER_NAME);
pawn Код:
owner[MAX_PLAYER_NAME],