Çözüldü error: use of undeclared identifier 'iEmptyCell'

  • Konuyu açan Konuyu açan samed0106
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 16
  • Gösterim Gösterim 207
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

samed0106

Üye
Üye
Mesaj
83
Çözümler
5
Beğeni
12
Puan
429
Ticaret Puanı
0
Sysser:
Genişlet Daralt Kopyala
char_item.cpp:6492:9: error: use of undeclared identifier 'iEmptyCell'
 6492 |                         if ((iEmptyCell = GetEmptySkillBookInventory(item->GetSize())) == -1)
      |                              ^
char_item.cpp:6501:9: error: use of undeclared identifier 'iEmptyCell'
 6501 |                         if ((iEmptyCell = GetEmptyUpgradeItemsInventory(item->GetSize())) == -1)
      |                              ^
char_item.cpp:6510:9: error: use of undeclared identifier 'iEmptyCell'compiling db.cpp

 6510 |                         icompiling desc.cpp
f compiling desc_client.cpp
((iEmptyCell = GetEmptyStoneInventory(item->GetSize())) == -1)
      |                              ^
char_item.cpp:6519:9: error: use of undeclared identifier 'iEmptyCell'
 6519 |                         if ((iEmptyCell = GetEmptyBoxInventory(item->GetSize())) == -1)
      |                              ^
compiling desc_manager.cpp
char_item.cpp:6528:9: error: use of undeclared identifier 'iEmptyCell'
 6528 |                         if ((iEmptyCell = GetEmptyEfsunInventory(item->GetSize())) == -1)
      |                              ^
char_item.cpp:6537:9: error: use of undeclared identifier 'iEmptyCell'
 6537 |                         if ((iEmptyCell = GetEmptyCicekInventory(item->GetSize())) == -1)
      |                              ^
char_item.cpp:6554:5: error: expected expression
 6554 |                                 else if (item->IsSkillBook())
      |                                 ^
char_item.cpp:6556:5: error: expected expression
 6556 |                                 else if (item->IsUpgradeItem())
      |                                 ^
char_item.cpp:6558:5: error: expected expression
 6558 |                                 else if (item->IsStone())
      |                                 ^
char_item.cpp:6560:5: error: expected expression
 6560 |                                 else if (item->IsBox())
      |                                 ^
char_item.cpp:6562:5: error: expected expression
 6562 |                                 else if (item->IsEfsun())
      |                                 ^
char_item.cpp:6564:5: error: expected expression
 6564 |                                 else if (item->IsCicek())
      |                                 ^
char_item.cpp:6848:2: error: expected expression
 6848 |         else if (item->IsSkillBook())
      |         ^
char_item.cpp:6850:2: error: expected expression
 6850 |         else if (item->IsUpgradeItem())
      |         ^
char_item.cpp:6852:2: error: expected expression
 6852 |         else if (item->IsStone())
      |         ^
char_item.cpp:6854:2: error: expected expression
 6854 |         else if (item->IsBox())
      |         ^
char_item.cpp:6856:2: error: expected expression
 6856 |         else if (item->IsEfsun())
      |         ^
char_item.cpp:6858:2: error: expected expression
 6858 |         else if (item->IsCicek())
      |         ^
char_item.cpp:6870:2: error: expected expression
 6870 |         else if (item->IsSkillBook())

Hatanın Olduğu Kod Bloğu:
Genişlet Daralt Kopyala
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
        else if (item->IsSkillBook())
        {
            if ((iEmptyCell = GetEmptySkillBookInventory(item->GetSize())) == -1)
            {
                sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
                return false;
            }
        }
        else if (item->IsUpgradeItem())
        {
            if ((iEmptyCell = GetEmptyUpgradeItemsInventory(item->GetSize())) == -1)
            {
                sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
                return false;
            }
        }
        else if (item->IsStone())
        {
            if ((iEmptyCell = GetEmptyStoneInventory(item->GetSize())) == -1)
            {
                sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
                return false;
            }
        }
        else if (item->IsBox())
        {
            if ((iEmptyCell = GetEmptyBoxInventory(item->GetSize())) == -1)
            {
                sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
                return false;
            }
        }
        else if (item->IsEfsun())
        {
            if ((iEmptyCell = GetEmptyEfsunInventory(item->GetSize())) == -1)
            {
                sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
                return false;
            }
        }
        else if (item->IsCicek())
        {
            if ((iEmptyCell = GetEmptyCicekInventory(item->GetSize())) == -1)
            {
                sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
                return false;
            }
        }
#endif
 
Çözüm
Şunada bakma şansınız var mı hocam. Teşekkür ederim bu arada.
C++:
Genişlet Daralt Kopyala
ld: error: undefined symbol: CItem::IsSkillBook()
>>> referenced by shopEx.cpp:191
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:231
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:329
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsUpgradeItem()
>>> referenced by shopEx.cpp:195
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:233
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced...
hatanın olduğu kodun üzerinde bu kod olacak

if (item->IsDragonSoul())

onun üzerine bunu ekleyin

int iEmptyCell;
IsDragonSoul kodu charitem.cpp içinde hiç biyerde yok martysama 5.8 kullanıyorum dragonsoulu ya kaldırmışlar ya da ismini değiştirmişler.
 
IsDragonSoul kodu charitem.cpp içinde hiç biyerde yok martysama 5.8 kullanıyorum dragonsoulu ya kaldırmışlar ya da ismini değiştirmişler.
item->IsDragonSoul() nereden aldığını pointerin işaret ettiği isim zaten söylüyor. (Başka isim de kullanılır ama hemen oradan kavraman lazım :) ) item.h içerisinde. Hem senin onunla işin yok serketin dediğini yap hatan çözülür.
 
Son düzenleme:
Ekran Alıntısı.webp


HATA ALAN BAŞKA ARKADAŞLAR OLURSA BU ŞEKİLDE EKLESİNLER dosyanızı ilettim hocam sorun çözüldüyse en iyi cevap olarak işaretleyin başka kişiler hata alırsa yararlansın
 

Dosya Eklentileri

Son düzenleme:
18974 eklentisini görüntüle

HATA ALAN BAŞKA ARKADAŞLAR OLURSA BU ŞEKİLDE EKLESİNLER dosyanızı ilettim hocam sorun çözüldüyse en iyi cevap olarak işaretleyin başka kişiler hata alırsa yararlansın
C++:
Genişlet Daralt Kopyala
char_item.cpp:6524:9: error: compiling desc.cpp
redefinition of 'iEmptyCell'
 6524 |                                 int iEmptyCell = GetEmptyInventoryEx(item);
      |                                     ^
char_item.cpp:6523:9: note: previous definition is here
 6523 |                                 int iEmptyCell; /* eklenti buraya eklendi. */
      |                                     ^
char_item.cpp:6762:1: error: function definition is not allowed here
 6762 | {
      | ^
char_item.cpp:6840:1: error: function definition is not allowed here
 6840 | {
      | ^
char_item.cpp:6908:1: error: function definition is not allowed here
 6908 | {
      | ^
char_item.cpp:7163:1: error: function definition is not allowed here
 7163 | {
      | ^
char_item.cpp:7175:1: error: function definition is not allowed here
 7175 | {
      | ^
char_item.cpp:7187:1: error: function definition is not allowed here
 7187 | {
      | ^
char_item.cpp:7199:1: error: function definition is not allowed here
 7199 | {
      | ^
char_item.cpp:7258:1: error: function definition is not allowed here
 7258 | {
      | ^
char_item.cpp:7271:1: error: function definition is not allowed here
 7271 | {
      | ^
char_item.cpp:7292:1: error: function definition is not allowed here
 7292 | {
      | ^
char_item.cpp:7414:1: error: function definition is not allowed here
 7414 | {
      | ^
char_item.cpp:7491:1: error: function definition is not allowed here
 7491 | {
      | ^
char_item.cpp:7511:1: error: function definition is not allowed here
 7511 | {
      | ^
char_item.cpp:7551:1: error: function definition is not allowed here
 7551 | {
      | ^
char_item.cpp:7655:1: error: function definition is not allowed here
 7655 | {
      | ^
char_item.cpp:7690:1: error: function definition is not allowed here
 7690 | {
      | ^
char_item.cpp:7733:1: error: function definition is not allowed here
 7733 | {
      | ^
char_item.cpp:7886:1: error: function definition is not allowed here
 7886 | {
      | ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake: *** [Makefile:180: .obj/char_item.o] Error 1
 
C++:
Genişlet Daralt Kopyala
char_item.cpp:6524:9: error: compiling desc.cpp
redefinition of 'iEmptyCell'
 6524 |                                 int iEmptyCell = GetEmptyInventoryEx(item);
      |                                     ^
char_item.cpp:6523:9: note: previous definition is here
 6523 |                                 int iEmptyCell; /* eklenti buraya eklendi. */
      |                                     ^
char_item.cpp:6762:1: error: function definition is not allowed here
 6762 | {
      | ^
char_item.cpp:6840:1: error: function definition is not allowed here
 6840 | {
      | ^
char_item.cpp:6908:1: error: function definition is not allowed here
 6908 | {
      | ^
char_item.cpp:7163:1: error: function definition is not allowed here
 7163 | {
      | ^
char_item.cpp:7175:1: error: function definition is not allowed here
 7175 | {
      | ^
char_item.cpp:7187:1: error: function definition is not allowed here
 7187 | {
      | ^
char_item.cpp:7199:1: error: function definition is not allowed here
 7199 | {
      | ^
char_item.cpp:7258:1: error: function definition is not allowed here
 7258 | {
      | ^
char_item.cpp:7271:1: error: function definition is not allowed here
 7271 | {
      | ^
char_item.cpp:7292:1: error: function definition is not allowed here
 7292 | {
      | ^
char_item.cpp:7414:1: error: function definition is not allowed here
 7414 | {
      | ^
char_item.cpp:7491:1: error: function definition is not allowed here
 7491 | {
      | ^
char_item.cpp:7511:1: error: function definition is not allowed here
 7511 | {
      | ^
char_item.cpp:7551:1: error: function definition is not allowed here
 7551 | {
      | ^
char_item.cpp:7655:1: error: function definition is not allowed here
 7655 | {
      | ^
char_item.cpp:7690:1: error: function definition is not allowed here
 7690 | {
      | ^
char_item.cpp:7733:1: error: function definition is not allowed here
 7733 | {
      | ^
char_item.cpp:7886:1: error: function definition is not allowed here
 7886 | {
      | ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake: *** [Makefile:180: .obj/char_item.o] Error 1
Resmini atsana kanka buraya bi bakayım yada kodun bir kısmını yapıştır
 
Ekran görüntüsü 2024-09-17 225559.webp


Kırmızı ile işaretlediğim yere } koyman gerekiyor.
Ana konudaki hata satırı ile verdiğin dosyaların satır numarası uyuşmadığı için tam olarak tespit edemedim.
 
Son düzenleme:
@kaiserin dediği gibi konuda arkadaşın sana attığı char_item.cpp yi düzeltip gönderdim
Şunada bakma şansınız var mı hocam. Teşekkür ederim bu arada.
C++:
Genişlet Daralt Kopyala
ld: error: undefined symbol: CItem::IsSkillBook()
>>> referenced by shopEx.cpp:191
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:231
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:329
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsUpgradeItem()
>>> referenced by shopEx.cpp:195
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:233
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:333
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsStone()
>>> referenced by shopEx.cpp:199
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:235
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:337
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsBox()
>>> referenced by shopEx.cpp:203
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:237
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:341
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsEfsun()
>>> referenced by shopEx.cpp:207
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:239
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:345
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsCicek()
>>> referenced by shopEx.cpp:211
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:241
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:349
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
 

Dosya Eklentileri

Şunada bakma şansınız var mı hocam. Teşekkür ederim bu arada.
C++:
Genişlet Daralt Kopyala
ld: error: undefined symbol: CItem::IsSkillBook()
>>> referenced by shopEx.cpp:191
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:231
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:329
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsUpgradeItem()
>>> referenced by shopEx.cpp:195
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:233
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:333
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsStone()
>>> referenced by shopEx.cpp:199
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:235
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:337
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsBox()
>>> referenced by shopEx.cpp:203
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:237
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:341
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsEfsun()
>>> referenced by shopEx.cpp:207
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:239
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:345
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsCicek()
>>> referenced by shopEx.cpp:211
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:241
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:349
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Kanka şu an işteyim dosyayı kontrol etme şansım yok ama item.h de prototipin varlığını kontrol et.

bool IsBook();

gibi resim atabilirsin hata verdiği yerden.
 
Şunada bakma şansınız var mı hocam. Teşekkür ederim bu arada.
C++:
Genişlet Daralt Kopyala
ld: error: undefined symbol: CItem::IsSkillBook()
>>> referenced by shopEx.cpp:191
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:231
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:329
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsUpgradeItem()
>>> referenced by shopEx.cpp:195
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:233
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:333
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsStone()
>>> referenced by shopEx.cpp:199
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:235
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:337
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsBox()
>>> referenced by shopEx.cpp:203
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:237
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:341
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsEfsun()
>>> referenced by shopEx.cpp:207
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:239
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:345
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times

ld: error: undefined symbol: CItem::IsCicek()
>>> referenced by shopEx.cpp:211
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shopEx.cpp:241
>>>               .obj/shopEx.o:(CShopEx::Buy(CHARACTER*, unsigned char))
>>> referenced by shop.cpp:349
>>>               .obj/shop.o:(CShop::Buy(CHARACTER*, unsigned char))
>>> referenced 18 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
özelden anydesk atarmısınız bana 2 saate kadar
 
Çözüm
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst