[MySql]Interior not loading.
#1

Hello guys, i am trying to create a simple business system.
But i got some problems. I am using MySql. It's loading everything fine just problem with interior load.

My code :

Selecting all from business :
PHP код:
format(querysizeof(query), "SELECT * FROM business");
    
mysql_function_query(dbhandlequerytrue"OnBizLoad"""); 
OnBizLoad :
PHP код:
public OnBizLoad()
{
    new 
num_fields,num_rows;
    
cache_get_data(num_rows,num_fields,dbhandle);
    if(!
num_rows)return 1;
    for(new 
i=0i<num_rowsi++)
     {
         new 
id=GetFreeBizID();
        
bInfo[id][b_x]=cache_get_field_content_float(i"b_x",dbhandle);
        
bInfo[id][b_y]=cache_get_field_content_float(i"b_y",dbhandle);
        
bInfo[id][b_z]=cache_get_field_content_float(i"b_z",dbhandle);
        
bInfo[id][b_intx]=cache_get_field_content_float(i"b_intx",dbhandle);
        
bInfo[id][b_inty]=cache_get_field_content_float(i"b_inty",dbhandle);
        
bInfo[id][b_intz]=cache_get_field_content_float(i"b_intz",dbhandle);
        
bInfo[id][b_int]=cache_get_field_content_int(i"b_int"dbhandle);
        
bInfo[id][b_entry]=cache_get_field_content_int(i"b_entry"dbhandle);
        
bInfo[id][b_price]=cache_get_field_content_int(i"b_price"dbhandle);
        
bInfo[id][b_selling]=cache_get_field_content_int(i"b_selling"dbhandle);
        new 
tmp_bname[128],tmp_type[20];
        
cache_get_field_content(i"b_name"tmp_bname);
        
strmid(bInfo[id][b_name], tmp_bname0sizeof(tmp_bname), sizeof(tmp_bname));
        
cache_get_field_content(i"b_type"tmp_type);
        
strmid(bInfo[id][b_type], tmp_type0sizeof(tmp_type), sizeof(tmp_type));
        new 
tmp_name[MAX_PLAYER_NAME];
        
cache_get_field_content(i"b_owner"tmp_name);
        
strmid(bInfo[id][b_owner], tmp_name0sizeof(tmp_name), sizeof(tmp_name));
        
bInfo[id][b_id]=cache_get_field_content_int(i"id"dbhandle);
        
bInfo[id][b_price]=cache_get_field_content_int(i"b_price"dbhandle);
        new 
m[126];
        
format(msizeof(m), "ICON POST : %f,%f,%f | Interiror : %f,%f,%f"bInfo[id][b_x],bInfo[id][b_y],bInfo[id][b_z],bInfo[id][b_intx],bInfo[id][b_inty],bInfo[id][b_intz]);
        
SendClientMessageToAll(-1m);
        
UpdateBiz(id);
     }
    return 
1;

I had tested with format and sendclientmessage to check the interior is loading. it shows 0.00000
Reply


Messages In This Thread
[MySql]Interior not loading. - by akib - 01.03.2018, 15:04
Re: [MySql]Interior not loading. - by akib - 02.03.2018, 14:42
Re: [MySql]Interior not loading. - by SoFahim - 02.03.2018, 14:50
Re: [MySql]Interior not loading. - by akib - 02.03.2018, 14:52
Re: [MySql]Interior not loading. - by PepsiCola23 - 02.03.2018, 15:10
Re: [MySql]Interior not loading. - by akib - 02.03.2018, 15:12
Re: [MySql]Interior not loading. - by SoFahim - 02.03.2018, 16:08
Re: [MySql]Interior not loading. - by akib - 03.03.2018, 05:02
Re: [MySql]Interior not loading. - by SoFahim - 03.03.2018, 05:25
Re: [MySql]Interior not loading. - by akib - 03.03.2018, 05:51

Forum Jump:


Users browsing this thread: 1 Guest(s)