mySQL loading system
#2

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.

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);
    ...
}
Reply


Messages In This Thread
mySQL loading system - by ShadowMortar - 16.01.2019, 08:37
Re: mySQL loading system - by Calisthenics - 16.01.2019, 11:16
Re: mySQL loading system - by ShadowMortar - 16.01.2019, 18:25
Re: mySQL loading system - by Calisthenics - 16.01.2019, 18:49
Re: mySQL loading system - by andrejc999 - 17.01.2019, 07:34

Forum Jump:


Users browsing this thread: 1 Guest(s)