Проблема с загрузкой из бд.
#1

Вообщем вот 2 паблика которые должны загружать подьезды и квартиры.

Но в итоге они нечего не загружают просто


PHP код:
forward LoadKv();
public 
LoadKv()
{
    new 
time GetTickCount();
    new 
rowsfields;
    
cache_get_data(rowsfields);
    if(!
rows)
    {
        for(new 
idx 1idx <= rowsidx++)
        {
            
KvInfo[idx][id] = cache_get_field_content_int(idx-1"id"dbHandle); // id
            
cache_get_field_content(idx-1"name"KvInfo[idx][kOwner], dbHandleMAX_PLAYER_NAME); // ip
            
KvInfo[idx][kX] = cache_get_field_content_float(idx-1"x"dbHandle); // kEntrx
            
KvInfo[idx][kY] = cache_get_field_content_float(idx-1"y"dbHandle); // kEntry
            
KvInfo[idx][kZ] = cache_get_field_content_float(idx-1"z"dbHandle); // kEntrz
            
KvInfo[idx][kXX] = cache_get_field_content_float(idx-1"xx"dbHandle); // kExitx
            
KvInfo[idx][kYY] = cache_get_field_content_float(idx-1"yy"dbHandle); // kExity
            
KvInfo[idx][kZZ] = cache_get_field_content_float(idx-1"zz"dbHandle); // hExitz
            
KvInfo[idx][kInt] = cache_get_field_content_int(idx-1"int"dbHandle); // carx
            
KvInfo[idx][kVirt] = cache_get_field_content_int(idx-1"virt"dbHandle); // cary
            
KvInfo[idx][kFa] = cache_get_field_content_float(idx-1"kfa"dbHandle); // carz
            
KvInfo[idx][kPod] = cache_get_field_content_int(idx-1"pod"dbHandle); // carfa
            
KvInfo[idx][kCost] = cache_get_field_content_int(idx-1-1"cost"dbHandle); // kExitx
            
KvInfo[idx][kCarx] = cache_get_field_content_float(idx-1"carx"dbHandle); // kExity
            
KvInfo[idx][kCary] = cache_get_field_content_float(idx-1"cary"dbHandle); // kExity
            
KvInfo[idx][kCarz] = cache_get_field_content_float(idx-1"carz"dbHandle); // kExitz
            
KvInfo[idx][kCarfa] = cache_get_field_content_float(idx-1"carfa"dbHandle); // buyprice
            
KvInfo[idx][kHeal] = cache_get_field_content_int(idx-1"kHeal"dbHandle); // kInt
            
KvInfo[idx][kOplata] = cache_get_field_content_int(idx-1"kOplata"dbHandle); //kVirtual
            
KvInfo[idx][kLock] = cache_get_field_content_int(idx-1"kLock"dbHandle); // kLock
            
TOTALKV++;
            if(!
strcmp(KvInfo[idx][kOwner],"None",true))
            {
                static const 
fmt_string1[] = "Квартира: %i\nСтоимость: $%i\nВойти ALT";
                new 
str1[sizeof(fmt_string1)+4+10];
                
format(str1,sizeof(str1),fmt_string1,KvInfo[idx][id],KvInfo[idx][kCost]);
                
KvLable[idx] = Create3DTextLabel(str1,0xDCEDF9FF,KvInfo[idx][kX], KvInfo[idx][kY], KvInfo[idx][kZ]+1,20.0,KvInfo[idx][kVirt],1);
            }
            else
            {
                static const 
fmt_string1[] = "Квартира: %i\nВладелец: %s\nВойти ALT";
                new 
str1[sizeof(fmt_string1)+4+MAX_PLAYER_NAME];
                
format(str1,sizeof(str1),fmt_string1,KvInfo[idx][id],KvInfo[idx][kOwner]);
                
KvLable[idx] = Create3DTextLabel(str1,-1,KvInfo[idx][kX], KvInfo[idx][kY], KvInfo[idx][kZ]+1,20.0,KvInfo[idx][kVirt],1);
            }
        }
    }
    
printf(" [LOAD]: Успешная загрузка 'LoadKZ' - загружено %d за %d м.с"TOTALKV,GetTickCount() - time);
    return 
1;
}
forward LoadPd();
public 
LoadPd()
{
    new 
time GetTickCount();
    new 
rowsfields;
    
cache_get_data(rowsfields);
    if(!
rows)
    {
        for(new 
idx 1idx <= rowsidx++)
        {
        
            
pdInfo[idx][id] = cache_get_field_content_int(idx-1"id"dbHandle); // id
            
pdInfo[idx][pdX] = cache_get_field_content_float(idx-1"x"dbHandle); // hEntrx
            
pdInfo[idx][pdY] = cache_get_field_content_float(idx-1"y"dbHandle); // hEntry
            
pdInfo[idx][pdZ] = cache_get_field_content_float(idx-1"z"dbHandle); // hEntrz
            
pdInfo[idx][pdXX] = cache_get_field_content_float(idx-1"xx"dbHandle); // hExitx
            
pdInfo[idx][pdYY] = cache_get_field_content_float(idx-1"yy"dbHandle); // hExity
            
pdInfo[idx][pdZZ] = cache_get_field_content_float(idx-1"zz"dbHandle); // hExitz
            
pdInfo[idx][pdVirt] = cache_get_field_content_int(idx-1"virt"dbHandle); // hPrice
            
pdInfo[idx][pdNach] = cache_get_field_content_int(idx-1"nach"dbHandle); // buyprice
            
pdInfo[idx][pdKon] = cache_get_field_content_int(idx-1"kon"dbHandle); // hInt
            
pdInfo[idx][pdFa] = cache_get_field_content_float(idx-1"fa"dbHandle); // hVirtual
    
            
TOTALPD++;
            
pdInfo[idx][pdPick][0] = CreatePickup(131823pdInfo[idx][pdX],pdInfo[idx][pdY],pdInfo[idx][pdZ]+0.35,0);
            
pdInfo[idx][pdPick][1] = CreatePickup(131823630.4156,-178.2735,997.0044,pdInfo[idx][pdVirt]);
            
pdInfo[idx][pdPick][2] = CreatePickup(123923628.1050,-168.0597,998.7397,pdInfo[idx][pdVirt]);
            static const 
fmt_string1[] = "Подъезд: %i\nКвартиры %i-%i";
            new 
str1[sizeof(fmt_string1)+5+5+5];
            
format(str1,sizeof(str1),fmt_string1,pdInfo[idx][id],pdInfo[idx][pdNach],pdInfo[idx][pdKon]);
            
pdLable[idx] = Create3DTextLabel(str1,0xDCEDF9FF,pdInfo[idx][pdX], pdInfo[idx][pdY], pdInfo[idx][pdZ]+1,20.0,0,1);
            
pdInfo[idx][pdIcon] = CreateDynamicMapIcon(pdInfo[idx][pdX], pdInfo[idx][pdY], pdInfo[idx][pdZ], 32, -10, -1, -1100.0);
        }
    }
    
printf(" [LOAD]: Успешная загрузка 'LoadPD' - загружено %d за %d м.с"TOTALPD,GetTickCount() - time);
    return 
1;

[LOAD]: Успешная загрузка 'LoadKZ' - загружено 0 за 0 м.с
[LOAD]: Успешная загрузка 'LoadPD' - загружено 0 за 0 м.с

Помогите разобраться и за чего.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)