K Envanter - BURHANBEY game src hata çözümü 2

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 32

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
shop.cpp: In member function 'virtual int CShop::Buy(CHARACTER*, BYTE)':
shop.cpp:385: error: 'pkNewItem' was not declared in this scope
gmake: *** [OBJDIR/shop.o] Error 1

Hatasının çözümü
Arat :
#ifdef WJ_SPLIT_INVENTORY_SYSTEM
else if (pkNewItem->IsSkillBook())
pkNewItem->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
else if (pkNewItem->IsUpgradeItem())
pkNewItem->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
else if (pkNewItem->IsStone())
pkNewItem->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
else if (pkNewItem->IsSandik())
pkNewItem->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
#endif
Değiştir:
#ifdef WJ_SPLIT_INVENTORY_SYSTEM
else if (item->IsSkillBook())
item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
else if (item->IsUpgradeItem())
item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
else if (item->IsStone())
item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
else if (item->IsSandik())
item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
#endif

Umarım bu konu da yararlı olmuştur :)
K Envanter - BURHANBEY Game Source Hata Çözümü 2

Metin2 Lobby olarak sunucu geliştirme süreçlerinde karşılaşılan hataların çözümüne odaklanıyoruz. Bu yazıda BURHANBEY tarafından geliştirilen Metin2 game source üzerinde ortaya çıkan K envanter hatası üzerine detaylı bir analiz ve çözüm yolu sunuyoruz. Bu hata, özellikle C++ tabanlı game src düzenlemelerinde sıkça görülmektedir ve doğru tanımlamalar yapılmadığında client tarafında beklenmedik davranışlara yol açabilmektedir.

Hatanın Tanımı
K envanter sistemi, Metin2 oyununda ekstra envanter slotları sağlar. Ancak game source tarafında bu sistemin eksik veya hatalı entegrasyonu durumunda, oyuncular envanterdeki eşyaları taşıyamaz ya da eşya bilgileri doğru şekilde görüntülenemez. Özellikle uiscript ve py root dosyalarında yapılan değişikliklerle birlikte, game server tarafındaki packet tanımlarında da uyumsuzluklar meydana gelebilir.

Hata Belirtileri
- Eşyalar envanterde taşınamıyor
- Yeni slotlarda eşya görünmüyor
- Oyuncu envanteri açıldığında crash alınıyor
- Client ve server arasında envanter senkronizasyonu çalışmıyor

Çözüm Adımları
1. Packet Yapısının Kontrolü: Game src dosyasında bulunan chrmgr.cpp ve itemmgr.cpp gibi dosyalarda inventory packet tanımlarının client tarafındaki uiscript ile uyumlu olduğundan emin olunmalıdır. Özellikle BINARY_ItemInventoryData fonksiyonu gözden geçirilmelidir.

2. Client Tarafında Slot Tanımlaması: root/uitooltip.py veya benzeri dosyalarda K envanter slotlarının doğru tanımlandığından emin olun. Python GUI tarafında inventory window sınıfları ile server tarafındaki slot indeksleri uyumlu olmalıdır.

3. Item Struct Güncellemesi: item.h dosyasında tanımlanan TItemData yapısının client ile uyumlu olarak genişletilmiş olduğundan emin olun. Bu yapıda K envanter slotları için ayrılmış alanlar eksikse, sunucuda crash oluşabilir.

Gelişmiş Ayarlar
Metin2 özel sunucularında K envanter sistemi, martysama veya diğer geliştirici ekiplerin sistemleriyle entegre edilebilir. Bu entegrasyonda auth server ve game server senkronizasyonu önemlidir. DB core tarafında da player_item tablosuna yeni slot verileri eklenmelidir. Aksi takdirde veritabanı ile sunucu arasında veri aktarımı hatalı olur.

Test Süreci
Her değişiklik sonrası compile işlemi yapıldıktan sonra game server yeniden başlatılmalı ve client tarafında test yapılmalıdır. Python ve C++ tarafında hata ayıklama araçları kullanılmalı, log dosyaları izlenmelidir. Özellikle channel sunucularda farklı davranışlar olabilir, bu nedenle tüm sunucular test edilmelidir.

Sonuç
K envanter hatasının çözümünde en kritik adım, client ve game src uyumudur. Metin2 Lobby olarak bu konularda tecrübeli geliştiricilerle birlikte çalışarak en doğru çözümleri sunmaya devam ediyoruz. Dilerseniz Metin2 server geliştirme konusunda daha fazla source edit veya pack çözümü için sitemizi takip edin.


K Inventory - BURHANBEY Game Source Error Solution 2

Metin2 Lobby focuses on resolving errors encountered during server development processes. In this article, we provide a detailed analysis and solution path for the K inventory error that occurs in the Metin2 game source developed by BURHANBEY. This error frequently appears in C++ based game src modifications and can cause unexpected behaviors on the client side if proper definitions are not made, especially affecting client src operations.

Error Description
The K inventory system provides additional inventory slots in Metin2. However, incomplete or incorrect integration of this system into the game source can result in players being unable to move items or items not displaying correctly in the inventory. Especially with changes made in uiscript and py root files, incompatibilities may arise in packet definitions on the game server side.

Error Symptoms
- Items cannot be moved in the inventory
- Items do not appear in new slots
- Crash occurs when player opens inventory
- Inventory synchronization between client and server does not work

Solution Steps
1. Check Packet Structure: Ensure that inventory packet definitions in files such as chrmgr.cpp and itemmgr.cpp in the game src are compatible with the client side uiscript. Particularly, the BINARY_ItemInventoryData function should be reviewed.

2. Slot Definition on Client Side: Ensure correct definition of K inventory slots in files like root/uitooltip.py. The inventory window classes in Python GUI must align with slot indices on the server side.

3. Update Item Struct: Ensure that the TItemData structure defined in item.h has been extended compatibly with the client. If areas reserved for K inventory slots are missing, crashes can occur on the server.

Advanced Settings
In Metin2 private servers, the K inventory system can be integrated with systems from martysama or other developer teams. Integration requires synchronization between auth server and game server. New slot data must also be added to the player_item table in the DB core; otherwise, data transfer between the database and server will fail.

Testing Process
After each modification, the game server must be restarted after the compile process, and tests should be conducted on the client side. Debugging tools should be used on both Python and C++ sides, and log files should be monitored. Different behaviors may occur in channel servers, so all servers should be tested.

Conclusion
The most critical step in solving the K inventory error is compatibility between client and game src. As Metin2 Lobby, we continue to offer the best solutions by working with experienced developers in this area. For more source edit or pack solutions regarding Metin2 server development, follow our site.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt