Fethi Polat 1
Fethi Polat
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Scarlet 1
Scarlet
xranzei 1
xranzei
Hikaye Ekle

Cevaplanmadı kod yardım

  • Konuyu başlatan Konuyu başlatan Kenzox
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 10
  • Görüntüleme Görüntüleme 561

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Merhabalar hocalarım k envanter sistemini eklemeye çalışıyorum filesime ama char_item.cpp dosyamda dragon soula dair hiçbirşey yok arat bul yaparken dragon soula dair birşey bulamıyorum yardımcı olur musunuz
 

Ekli dosyalar

Senin için ekleme yaptım. Gözümden kaçan bir yer olabilir.
Atıp build almayı deneyip sonuçları paylaşır mısın?
Kod:
compiling char_resist.cpp
char_item.cpp:1022:37: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptySkillBookInventory(item);
                                                  ^~~~
./char.h:1271:42: note: passing argument to parameter 'size' here
                int                             GetEmptySkillBookInventory(BYTE size) const;
                                                                                ^
char_item.cpp:1024:40: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyUpgradeItemsInventory(item);
                                                     ^~~~
./char.h:1272:45: note: passing argument to parameter 'size' here
                int                             GetEmptyUpgradeItemsInventory(BYTE size) const;
                                                                                   ^
char_item.cpp:1026:33: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyStoneInventory(item);
                                              ^~~~
./char.h:1273:38: note: passing argument to parameter 'size' here
                int                             GetEmptyStoneInventory(BYTE size) const;
                                                                            ^
char_item.cpp:1028:31: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyBoxInventory(item);
                                            ^~~~
./char.h:1274:36: note: passing argument to parameter 'size' here
                int                             GetEmptyBoxInventory(BYTE size) const;
                                                                          ^
char_item.cpp:1030:33: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyEfsunInventory(item);
                                              ^~~~
./char.h:1275:38: note: passing argument to parameter 'size' here
                int                             GetEmptyEfsunInventory(BYTE size) const;
                                                                            ^
char_item.cpp:1032:33: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyCicekInventory(item);
                                              ^~~~
./char.h:1276:38: note: passing argument to parameter 'size' here
                int                             GetEmptyCicekInventory(BYTE size) const;
                                                                            ^
6 errors generated.
gmake[1]: *** [Makefile:180: .obj/char_item.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory '/home/gdb_server_source/Srcs/Server/game/src'
gmake: *** [Makefile:116: all] Error 2
 
Kod:
compiling char_resist.cpp
char_item.cpp:1022:37: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptySkillBookInventory(item);
                                                  ^~~~
./char.h:1271:42: note: passing argument to parameter 'size' here
                int                             GetEmptySkillBookInventory(BYTE size) const;
                                                                                ^
char_item.cpp:1024:40: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyUpgradeItemsInventory(item);
                                                     ^~~~
./char.h:1272:45: note: passing argument to parameter 'size' here
                int                             GetEmptyUpgradeItemsInventory(BYTE size) const;
                                                                                   ^
char_item.cpp:1026:33: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyStoneInventory(item);
                                              ^~~~
./char.h:1273:38: note: passing argument to parameter 'size' here
                int                             GetEmptyStoneInventory(BYTE size) const;
                                                                            ^
char_item.cpp:1028:31: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyBoxInventory(item);
                                            ^~~~
./char.h:1274:36: note: passing argument to parameter 'size' here
                int                             GetEmptyBoxInventory(BYTE size) const;
                                                                          ^
char_item.cpp:1030:33: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyEfsunInventory(item);
                                              ^~~~
./char.h:1275:38: note: passing argument to parameter 'size' here
                int                             GetEmptyEfsunInventory(BYTE size) const;
                                                                            ^
char_item.cpp:1032:33: error: cannot initialize a parameter of type 'BYTE' (aka 'unsigned char') with an lvalue of type 'LPITEM' (aka 'CItem *')
                cell = GetEmptyCicekInventory(item);
                                              ^~~~
./char.h:1276:38: note: passing argument to parameter 'size' here
                int                             GetEmptyCicekInventory(BYTE size) const;
                                                                            ^
6 errors generated.
gmake[1]: *** [Makefile:180: .obj/char_item.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory '/home/gdb_server_source/Srcs/Server/game/src'
gmake: *** [Makefile:116: all] Error 2

Kod:
int CHARACTER::GetEmptyInventoryEx(LPITEM item)
{
    if (!item)
        return -1;

    int cell = -1;
    if (item->IsDragonSoul())
        cell = GetEmptyDragonSoulInventory(item);
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    if (item->IsSkillBook())
        cell = GetEmptySkillBookInventory(item->GetSize());
    if (item->IsUpgradeItem())
        cell = GetEmptyUpgradeItemsInventory(item->GetSize());
    if (item->IsStone())
        cell = GetEmptyStoneInventory(item->GetSize());
    if (item->IsBox())
        cell = GetEmptyBoxInventory(item->GetSize());
    if (item->IsEfsun())
        cell = GetEmptyEfsunInventory(item->GetSize());
    if (item->IsCicek())
        cell = GetEmptyCicekInventory(item->GetSize());
#endif
    else
        cell = GetEmptyInventory(item->GetSize());

    return cell;
}

Bu şekilde değişip dener misin?
 
dediğiniz şekilde değişim yaptım aynı zamanda diğer dosyalarda da else if kodlarını if şekline çektim build aldım ama
1111_084823.jpg



fotoğraftaki gibi gözükmekte npc marketlerin hepsi değişiklik yaptıgım bütün server dosyaları burda game.rar zip arsivinde k envanter yazan da değiştirilme şekli var müsait zamanda bakabilir misiniz dosyaların orjinal hali de ekli
 

Ekli dosyalar

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst