Yardım Build hata alıyorum

Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

onurgorhan

Üye
Üye
Mesaj
53
Çözümler
2
Beğeni
1
Puan
444
Ticaret Puanı
0
gmake: *** [Makefile:167: .obj/char_state.o] Error 1
packet.h:701:2: warning: 'SHOP_SUBHEADER_CG_ADD_ITEM' defined but not used [-Wunused-variable]
701 | SHOP_SUBHEADER_CG_ADD_ITEM,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
packet.h:700:2: warning: 'SHOP_SUBHEADER_CG_WITHDRAW_ITEM' defined but not used [-Wunused-variable]
700 | SHOP_SUBHEADER_CG_WITHDRAW_ITEM,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packet.h:696:2: warning: 'SHOP_SUBHEADER_CG_WITHDRAW_GOLD' defined but not used [-Wunused-variable]
696 | SHOP_SUBHEADER_CG_WITHDRAW_GOLD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packet.h:695:2: warning: 'SHOP_SUBHEADER_CG_CHANGE_SIGN' defined but not used [-Wunused-variable]
695 | SHOP_SUBHEADER_CG_CHANGE_SIGN,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packet.h:694:2: warning: 'SHOP_SUBHEADER_CG_LOCK' defined but not used [-Wunused-variable]
694 | SHOP_SUBHEADER_CG_LOCK,
| ^~~~~~~~~~~~~~~~~~~~~~
packet.h:693:2: warning: 'SHOP_SUBHEADER_CG_CLOSE' defined but not used [-Wunused-variable]
693 | SHOP_SUBHEADER_CG_CLOSE,
| ^~~~~~~~~~~~~~~~~~~~~~~
gmake: *** [Makefile:167: .obj/char_skill.o] Error 1

hataya alıyorum sorunda yok baktım yardımcı olurmusunuz
 

Dosya Eklentileri

  • 1.png
    1.png
    8,3 KB · Gösterim: 40
sell2 nin sonuna virgül koy
char_item.cpp: In member function 'void CHARACTER::SetItem(TItemPos, LPITEM, bool)':
char_item.cpp:406:19: error: 'CHARACTER_POINT_INSTANT' {aka 'struct character_point_instant'} has no member named 'pItems'
406 | m_pointsInstant.pItems[wCell] = pItem;
bu seferde bunu verdi


#ifdef WJ_OFFLINE_SHOP_SYSTEM
case OFFLINE_SHOP:
m_pointsInstant.pItems[wCell] = pItem;
break;
#endif

kod blog bu
 
char_item.cpp: In member function 'void CHARACTER::SetItem(TItemPos, LPITEM, bool)':
char_item.cpp:406:19: error: 'CHARACTER_POINT_INSTANT' {aka 'struct character_point_instant'} has no member named 'pItems'
406 | m_pointsInstant.pItems[wCell] = pItem;
bu seferde bunu verdi


#ifdef WJ_OFFLINE_SHOP_SYSTEM
case OFFLINE_SHOP:
m_pointsInstant.pItems[wCell] = pItem;
break;
#endif

kod blog bu
sondaki ADD_ITEM in , kaldır dene bi
 
c++:
#ifdef WJ_OFFLINE_SHOP_SYSTEM
    case OFFLINE_SHOP:
        m_pointsInstant.pItem[wCell] = pItem;
        break;
#endif

Şöyle dener misin hata veren kod bloğunu böyle değiştir
 
c++:
#ifdef WJ_OFFLINE_SHOP_SYSTEM
    case OFFLINE_SHOP:
        m_pointsInstant.pItem[wCell] = pItem;
        break;
#endif

Şöyle dener misin hata veren kod bloğunu böyle değiştir
denedim öyle onuda kabul etmiyor

char_item.cpp:406:19: error: 'CHARACTER_POINT_INSTANT' {aka 'struct character_point_instant'} has no member named 'pItem'
406 | m_pointsInstant.pItem[wCell] = pItem;
| ^~~~~
 
//ARA :
default:
sys_err ("Invalid Inventory type %d", window_type);
return;

//ÜSTÜNE EKLE :
#ifdef WJ_OFFLINE_SHOP_SYSTEM
case OFFLINE_SHOP:
m_pointsInstant.pItems[wCell] = pItem;
break;
#endif

sistem ekledimde client sıkıntı yok build ettim ama server taraflı codları hata veriyor ben anlamadım dogru eklnedı hepsi
 
//ARA :
default:
sys_err ("Invalid Inventory type %d", window_type);
return;

//ÜSTÜNE EKLE :
#ifdef WJ_OFFLINE_SHOP_SYSTEM
case OFFLINE_SHOP:
m_pointsInstant.pItems[wCell] = pItem;
break;
#endif

sistem ekledimde client sıkıntı yok build ettim ama server taraflı codları hata veriyor ben anlamadım dogru eklnedı hepsi
defaultun üstünde 1 case daha olması lazım o casenin üstüne ekle birde
 
c:
#ifdef WJ_OFFLINE_SHOP_SYSTEM
        if (pItem)
        {
            CItemManager::Instance().RegisterItem(GetPlayerID(), pItem->GetID(), wCell);
        }
        else
        {
            CItemManager::Instance().UnregisterItem(GetPlayerID(), wCell);
        }

        m_pointsInstant.pItems[wCell] = pItem;
    }
    break;
#endif

Böyle değiştirir misin
 
c:
#ifdef WJ_OFFLINE_SHOP_SYSTEM
        if (pItem)
        {
            CItemManager::Instance().RegisterItem(GetPlayerID(), pItem->GetID(), wCell);
        }
        else
        {
            CItemManager::Instance().UnregisterItem(GetPlayerID(), wCell);
        }

        m_pointsInstant.pItems[wCell] = pItem;
    }
    break;
#endif

Böyle değiştirir misin
Kod:
char_item.cpp: In member function 'void CHARACTER::SetItem(TItemPos, LPITEM, bool)':
char_item.cpp:407:13: error: 'CItemManager' has not been declared
407 | CItemManager::Instance().RegisterItem(GetPlayerID(), pItem->GetID(), wCell);
| ^~~~~~~~~~~~
char_item.cpp:411:13: error: 'CItemManager' has not been declared
411 | CItemManager::Instance().UnregisterItem(GetPlayerID(), wCell);
| ^~~~~~~~~~~~
char_item.cpp:414:25: error: 'CHARACTER_POINT_INSTANT' {aka 'struct character_point_instant'} has no member named 'pItems'
414 | m_pointsInstant.pItems[wCell] = pItem;
| ^~~~~~
char_item.cpp:416:5: error: break statement not within loop or switch
416 | break;
| ^~~~~
char_item.cpp:418:2: error: case label not within a switch statement
418 | default:
| ^~~~~~~
char_item.cpp: At global scope:
char_item.cpp:423:2: error: expected unqualified-id before 'if'
423 | if (GetDesc())
| ^~
char_item.cpp:460:2: error: expected unqualified-id before 'if'
460 | if (pItem)
| ^~
char_item.cpp:482:1: error: expected declaration before '}' token
482 | }
| ^
 
En son bir moderatör tarafından düzenlenmiş:
pItems 'i görmüyor muhtemelen yanlış yere ekliyorsun yada eksik ekliyorsun. Kendi dosyanla eklemeye çalıştığın dosyayı bizle paylaşırsan daha iyi yardımcı olabiliriz.
 
Geri
Üst