SQLite Improved
#1

I am using SQLite improved by Slice to check if there are any errors or somethin when the SQL tries to execute a query or free's a result. While I am running the server, I get these spamming messages @ OnGameModeInit code.

Код:
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
[13:56:32] SQLitei Warning: (db_autofree_result) The autofree pool is full!
I have no idea on how to fix it. But this is what I do under OnGameModeInit callback,

PHP код:
CheckServer(); // Y_INI, ignore
for(new cMAX_FACTIONSc++)
{
    
LoadFactions(c);
    
LoadFacPay(c);
}
for(new 
cMAX_DEALERSHIPSc++)
{
    
LoadDealerShips(c);
}
for(new 
cMAX_IMPOUNDSc++)
{
    
LoadImpounds(c);
}
LoadDynamicMapIcons(); // Not SQLite ignore
LoadDynamicDoors(); // Not SQLite ignore
LoadGates(); // Not SQLite ignore
for(new cMAX_HOUSESc++)
{
    
LoadHouses(c);
    
LoadHousesInventory(c);
}
for(new 
cMAX_ARRESTSc++)
{
    
Arrest_Load(c);

And this is one of the example codes on how do I code them (LoadHouses for example)

PHP код:
stock LoadHouses(i)
{
    new
        
query[256],
        
DBResult:dbresult,
        
field[20]
    ;
    
format(querysizeof(query), "SELECT * FROM `houses` WHERE `id` = %d"i);
    
dbresult db_query(databasequery);
    
    if(
db_num_rows(dbresult))
    {
        
db_get_field_assoc(dbresult"owner"fieldsizeof(field));        format(HouseInfo[i][hOwner], 92field);
        
db_get_field_assoc(dbresult"address"fieldsizeof(field));        format(HouseInfo[i][hAddress], 92field);
        
db_get_field_assoc(dbresult"forsale"fieldsizeof(field));      HouseInfo[i][hForSale] = strval(field);
        
db_get_field_assoc(dbresult"price"fieldsizeof(field));          HouseInfo[i][hPrice] = strval(field);
        
db_get_field_assoc(dbresult"x"fieldsizeof(field));              HouseInfo[i][housePos][0] = floatstr(field);
        
db_get_field_assoc(dbresult"y"fieldsizeof(field));              HouseInfo[i][housePos][1] = floatstr(field);
        
db_get_field_assoc(dbresult"z"fieldsizeof(field));              HouseInfo[i][housePos][2] = floatstr(field);
        
db_get_field_assoc(dbresult"a"fieldsizeof(field));              HouseInfo[i][housePos][3] = floatstr(field);
        
db_get_field_assoc(dbresult"ix"fieldsizeof(field));              HouseInfo[i][houseInt][0] = floatstr(field);
        
db_get_field_assoc(dbresult"iy"fieldsizeof(field));              HouseInfo[i][houseInt][1] = floatstr(field);
        
db_get_field_assoc(dbresult"iz"fieldsizeof(field));              HouseInfo[i][houseInt][2] = floatstr(field);
        
db_get_field_assoc(dbresult"ia"fieldsizeof(field));              HouseInfo[i][houseInt][3] = floatstr(field);
        
db_get_field_assoc(dbresult"hox"fieldsizeof(field));              HouseInfo[i][houseObjectPos][0] = floatstr(field);
        
db_get_field_assoc(dbresult"hoy"fieldsizeof(field));              HouseInfo[i][houseObjectPos][1] = floatstr(field);
        
db_get_field_assoc(dbresult"hoz"fieldsizeof(field));              HouseInfo[i][houseObjectPos][2] = floatstr(field);
        
db_get_field_assoc(dbresult"hoa"fieldsizeof(field));              HouseInfo[i][houseObjectPos][3] = floatstr(field);
        
db_get_field_assoc(dbresult"interior"fieldsizeof(field));       HouseInfo[i][houseInterior] = strval(field);
        
db_get_field_assoc(dbresult"exteriorint"fieldsizeof(field));  HouseInfo[i][houseExteriorInt] = strval(field);
        
db_get_field_assoc(dbresult"exteriorvw"fieldsizeof(field));   HouseInfo[i][houseExteriorVW] = strval(field);
        
db_get_field_assoc(dbresult"locked"fieldsizeof(field));          HouseInfo[i][houseLocked] = strval(field);
        
db_get_field_assoc(dbresult"money"fieldsizeof(field));          HouseInfo[i][houseMoney] = strval(field);
        
db_get_field_assoc(dbresult"sx"fieldsizeof(field));              HouseInfo[i][houseStore][0] = floatstr(field);
        
db_get_field_assoc(dbresult"sy"fieldsizeof(field));              HouseInfo[i][houseStore][1] = floatstr(field);
        
db_get_field_assoc(dbresult"sz"fieldsizeof(field));              HouseInfo[i][houseStore][2] = floatstr(field);
        
House_Refresh(i);
        
ServerInfo[total_houses]++;
    }
    
db_free_result(dbresult);
    return 
1;

Am I doing something wrong here? I have used ReneG's ATM System's way on loading the datas (but I found out that the IDs are based upon from the rows not the ID row, if y'know what I mean).

Any helps would be appreciated.
Reply
#2

Your loading house is too slow and bad :c there're so faster & better way I could optimaze it for you when I get to my pc.... btw I think your problem answer's here
https://sampforum.blast.hk/showthread.php?tid=303682&page=15

EDIT:

Here we go about your house load now you just need a simple call for it,
Example:
OnGameModeInit we write LoadHouses(); and boom they will be loaded successfully [ this new script should be a lot faster than your old one, with less lag.... you can do a speed test

PHP код:
LoadHouses()
{
    new
        
query[256],
        
DBResult:dbresult,
        
field[20]
    ;
    
format(querysizeof(query), "SELECT * FROM `houses`);
    dbresult = db_query(database, query);
    if(db_num_rows(dbresult))
    {
        new rows = db_num_rows(dbresult);
        for(new i = 0; i < rows; i++) {
            if(i > MAX_HOUSES) {
               printf("   
ERRORMaximum houses value is %d but houses rows found are | %|",MAX_HOUSES,rows);
               break;
               // simple script to avoid loading houses which are more than MAX_HOUSES value
            }
            db_get_field_assoc(dbresult, "
owner", field, sizeof(field));        format(HouseInfo[i][hOwner], 92, field);
            db_get_field_assoc(dbresult, "
address", field, sizeof(field));        format(HouseInfo[i][hAddress], 92, field);
            db_get_field_assoc(dbresult, "
forsale", field, sizeof(field));      HouseInfo[i][hForSale] = strval(field);
            db_get_field_assoc(dbresult, "
price", field, sizeof(field));          HouseInfo[i][hPrice] = strval(field);
            db_get_field_assoc(dbresult, "
x", field, sizeof(field));              HouseInfo[i][housePos][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
y", field, sizeof(field));              HouseInfo[i][housePos][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
z", field, sizeof(field));              HouseInfo[i][housePos][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
a", field, sizeof(field));              HouseInfo[i][housePos][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
ix", field, sizeof(field));              HouseInfo[i][houseInt][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
iy", field, sizeof(field));              HouseInfo[i][houseInt][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
iz", field, sizeof(field));              HouseInfo[i][houseInt][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
ia", field, sizeof(field));              HouseInfo[i][houseInt][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
hox", field, sizeof(field));              HouseInfo[i][houseObjectPos][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoy", field, sizeof(field));              HouseInfo[i][houseObjectPos][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoz", field, sizeof(field));              HouseInfo[i][houseObjectPos][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoa", field, sizeof(field));              HouseInfo[i][houseObjectPos][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
interior", field, sizeof(field));       HouseInfo[i][houseInterior] = strval(field);
            db_get_field_assoc(dbresult, "
exteriorint", field, sizeof(field));  HouseInfo[i][houseExteriorInt] = strval(field);
            db_get_field_assoc(dbresult, "
exteriorvw", field, sizeof(field));   HouseInfo[i][houseExteriorVW] = strval(field);
            db_get_field_assoc(dbresult, "
locked", field, sizeof(field));          HouseInfo[i][houseLocked] = strval(field);
            db_get_field_assoc(dbresult, "
money", field, sizeof(field));          HouseInfo[i][houseMoney] = strval(field);
            db_get_field_assoc(dbresult, "
sx", field, sizeof(field));              HouseInfo[i][houseStore][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
sy", field, sizeof(field));              HouseInfo[i][houseStore][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
sz", field, sizeof(field));              HouseInfo[i][houseStore][2] = floatstr(field);
            House_Refresh(i);
            ServerInfo[total_houses]++;
            db_next_row(dbresult);
        }
    }
    db_free_result(dbresult);
    return 1;

about the "stock" thing
https://sampforum.blast.hk/showthread.php?tid=570635
Reply
#3

In 0.3.7 R2:
Quote:

- Adds console variable 'db_logging'. Logs sqlite db_* function errors to the main server_log.

so add in server.cfg
pawn Код:
db_logging 1
and it will log the errors.
Reply
#4

Quote:
Originally Posted by jlalt
Посмотреть сообщение
Your loading house is too slow and bad :c there're so faster & better way I could optimaze it for you when I get to my pc.... btw I think your problem answer's here
https://sampforum.blast.hk/showthread.php?tid=303682&page=15

EDIT:

Here we go about your house load now you just need a simple call for it,
Example:
OnGameModeInit we write LoadHouses(); and boom they will be loaded successfully [ this new script should be a lot faster than your old one, with less lag.... you can do a speed test

PHP код:
LoadHouses()
{
    new
        
query[256],
        
DBResult:dbresult,
        
field[20]
    ;
    
format(querysizeof(query), "SELECT * FROM `houses`);
    dbresult = db_query(database, query);
    if(db_num_rows(dbresult))
    {
        new rows = db_num_rows(dbresult);
        for(new i = 0; i < rows; i++) {
            if(i > MAX_HOUSES) {
               printf("   
ERRORMaximum houses value is %d but houses rows found are | %|",MAX_HOUSES,rows);
               break;
               // simple script to avoid loading houses which are more than MAX_HOUSES value
            }
            db_get_field_assoc(dbresult, "
owner", field, sizeof(field));        format(HouseInfo[i][hOwner], 92, field);
            db_get_field_assoc(dbresult, "
address", field, sizeof(field));        format(HouseInfo[i][hAddress], 92, field);
            db_get_field_assoc(dbresult, "
forsale", field, sizeof(field));      HouseInfo[i][hForSale] = strval(field);
            db_get_field_assoc(dbresult, "
price", field, sizeof(field));          HouseInfo[i][hPrice] = strval(field);
            db_get_field_assoc(dbresult, "
x", field, sizeof(field));              HouseInfo[i][housePos][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
y", field, sizeof(field));              HouseInfo[i][housePos][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
z", field, sizeof(field));              HouseInfo[i][housePos][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
a", field, sizeof(field));              HouseInfo[i][housePos][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
ix", field, sizeof(field));              HouseInfo[i][houseInt][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
iy", field, sizeof(field));              HouseInfo[i][houseInt][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
iz", field, sizeof(field));              HouseInfo[i][houseInt][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
ia", field, sizeof(field));              HouseInfo[i][houseInt][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
hox", field, sizeof(field));              HouseInfo[i][houseObjectPos][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoy", field, sizeof(field));              HouseInfo[i][houseObjectPos][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoz", field, sizeof(field));              HouseInfo[i][houseObjectPos][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoa", field, sizeof(field));              HouseInfo[i][houseObjectPos][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
interior", field, sizeof(field));       HouseInfo[i][houseInterior] = strval(field);
            db_get_field_assoc(dbresult, "
exteriorint", field, sizeof(field));  HouseInfo[i][houseExteriorInt] = strval(field);
            db_get_field_assoc(dbresult, "
exteriorvw", field, sizeof(field));   HouseInfo[i][houseExteriorVW] = strval(field);
            db_get_field_assoc(dbresult, "
locked", field, sizeof(field));          HouseInfo[i][houseLocked] = strval(field);
            db_get_field_assoc(dbresult, "
money", field, sizeof(field));          HouseInfo[i][houseMoney] = strval(field);
            db_get_field_assoc(dbresult, "
sx", field, sizeof(field));              HouseInfo[i][houseStore][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
sy", field, sizeof(field));              HouseInfo[i][houseStore][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
sz", field, sizeof(field));              HouseInfo[i][houseStore][2] = floatstr(field);
            House_Refresh(i);
            ServerInfo[total_houses]++;
            db_next_row(dbresult);
        }
    }
    db_free_result(dbresult);
    return 1;

about the "stock" thing
https://sampforum.blast.hk/showthread.php?tid=570635
Does this load and stored the datas base upon from ID row (for example, ID: 1) because I am having issues with the IDs when loading it using the rows (ID 1 all of the sudden becomes ID 0, ID row arent set to primary key btw)

@Konstantinos - Gonna try that out thx
Reply
#5

You mean your house ids are not sorted? example
ID 1
ID 3
ID 2
and so on?
if yes this should load it properly without problems

PHP код:
LoadHouses()
{
    new
        
query[256],
        
DBResult:dbresult,
        
field[20]
    ;

    
format(querysizeof(query), "SELECT * FROM `houses`);
    dbresult = db_query(database, query);

    if(db_num_rows(dbresult))
    {
        new rows = db_num_rows(dbresult),meid[10],idid;
        for(new i = 0; i < rows; i++) {
            if(i > MAX_HOUSES) {
               printf("   
ERRORMaximum houses value is %d but houses rows found are | %|",MAX_HOUSES,rows);
               break;
               // simple script to avoid loading houses which are more than MAX_HOUSES value
            }
            db_get_field_assoc(dbresult, "
id", meid, sizeof(meid));             idid = strval(meid);
            db_get_field_assoc(dbresult, "
owner", field, sizeof(field));        format(HouseInfo[idid][hOwner], 92, field);
            db_get_field_assoc(dbresult, "
address", field, sizeof(field));        format(HouseInfo[idid][hAddress], 92, field);
            db_get_field_assoc(dbresult, "
forsale", field, sizeof(field));      HouseInfo[idid][hForSale] = strval(field);
            db_get_field_assoc(dbresult, "
price", field, sizeof(field));          HouseInfo[idid][hPrice] = strval(field);
            db_get_field_assoc(dbresult, "
x", field, sizeof(field));              HouseInfo[idid][housePos][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
y", field, sizeof(field));              HouseInfo[idid][housePos][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
z", field, sizeof(field));              HouseInfo[idid][housePos][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
a", field, sizeof(field));              HouseInfo[idid][housePos][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
ix", field, sizeof(field));              HouseInfo[idid][houseInt][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
iy", field, sizeof(field));              HouseInfo[idid][houseInt][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
iz", field, sizeof(field));              HouseInfo[idid][houseInt][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
ia", field, sizeof(field));              HouseInfo[idid][houseInt][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
hox", field, sizeof(field));              HouseInfo[idid][houseObjectPos][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoy", field, sizeof(field));              HouseInfo[idid][houseObjectPos][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoz", field, sizeof(field));              HouseInfo[idid][houseObjectPos][2] = floatstr(field);
            db_get_field_assoc(dbresult, "
hoa", field, sizeof(field));              HouseInfo[idid][houseObjectPos][3] = floatstr(field);
            db_get_field_assoc(dbresult, "
interior", field, sizeof(field));       HouseInfo[idid][houseInterior] = strval(field);
            db_get_field_assoc(dbresult, "
exteriorint", field, sizeof(field));  HouseInfo[idid][houseExteriorInt] = strval(field);
            db_get_field_assoc(dbresult, "
exteriorvw", field, sizeof(field));   HouseInfo[idid][houseExteriorVW] = strval(field);
            db_get_field_assoc(dbresult, "
locked", field, sizeof(field));          HouseInfo[idid][houseLocked] = strval(field);
            db_get_field_assoc(dbresult, "
money", field, sizeof(field));          HouseInfo[idid][houseMoney] = strval(field);
            db_get_field_assoc(dbresult, "
sx", field, sizeof(field));              HouseInfo[idid][houseStore][0] = floatstr(field);
            db_get_field_assoc(dbresult, "
sy", field, sizeof(field));              HouseInfo[idid][houseStore][1] = floatstr(field);
            db_get_field_assoc(dbresult, "
sz", field, sizeof(field));              HouseInfo[idid][houseStore][2] = floatstr(field);
            House_Refresh[idid];
            ServerInfo[total_houses]++;
            db_next_row(dbresult);
        }
    }
    db_free_result(dbresult);
    return 1;

about this message / warning spam Slice said you have to increase gs_adbrAutoFreeResults value, at this link:

https://sampforum.blast.hk/showthread.php?tid=303682&page=15

Quote:
Originally Posted by Slice
Посмотреть сообщение
It's because of memory leaks, yes. You could modify the size of gs_adbrAutoFreeResults until the errors stop (that's a good start if you need it fixed quickly).
Reply
#6

The IDs are not sorted, Admins have to input the IDs. So the IDs might look like this if skipped.

ID 0
ID 2
ID 3
ID 5

....
Reply
#7

Sorry for double posting, There are no errors or what so ever when I enabled the db_logging. However when I enable db_log_queries, It crashes (lmao). It must have been the SQLi (The size of gs_adbrAutoFreeResults)

EDIT: When I logged in game, The house is now loaded to it's proper ID (which is #1). So I guess the problem is solved?
Reply
#8

You mean now no errors and the load which I gave working good :- o?
Reply
#9

No, I didn't use your code yet I am still using my code (I have removed SQLi) and the errors stopped (The size of gs_adbrAutoFreeResults must be causing the problems) - Even if I have the db_logging on, there are no errors being logged by the server during these stocks being called @ OnGameModeInit
Reply
#10

Alright so you give up .-., btw you can simple stop the spam lol, [ not recommended but works yet]

find in include file:
PHP код:
DB::Warning("(db_autofree_result) The autofree pool is full!"); 
and "DELETE" it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)