Çözüldü Ticaret ekranı item koyulmama sorunu

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ı.

okcoder1134

MT Üye
MT Üye
Mesaj
265
Çözümler
16
Beğeni
154
Puan
734
Ticaret Puanı
0
Kod:
0429 05:28:05966 :: Traceback (most recent call last):

0429 05:28:05966 ::   File "ui.py", line 4156, in OnSelectEmptySlot

0429 05:28:05966 ::   File "ui.py", line 137, in __call__

0429 05:28:05966 ::   File "ui.py", line 128, in __call__

0429 05:28:05966 ::   File "uiExchange.py", line 212, in SelectOwnerEmptySlot

0429 05:28:05967 :: UnboundLocalError
0429 05:28:05967 :: :
0429 05:28:05967 :: local variable 'attachedInvenType' referenced before assignment
0429 05:28:05967 ::

İtemi karakterler arası Ticaret ekranına koymaya çalışınca koyulmuyor. ve bu syserri alıyorum. Çözümü nedir?
 
Çözüm
O şekilde de hata olur. Bu sefer envanter kontrolünü kaldırmış oluyorsunuz. Zaten k envanteri kullanacaksanız app.WJ kısmını kaldırın gitsin. İlla o kontrol olsun diyorsanız şunu deneyin;
Python:
    def SelectOwnerEmptySlot(self, SlotIndex):
        if FALSE == mouseModule.mouseController.isAttached():
            return
        if mouseModule.mouseController.IsAttachedMoney():
            net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
        else:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()
            if app.WJ_SPLIT_INVENTORY_SYSTEM:
                if player.SLOT_TYPE_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_DRAGON_SOUL_INVENTORY ==...
uiExchange.py 212. satırda yazanları paylaşır mısınız
 
Python:
        if mouseModule.mouseController.IsAttachedMoney():
            net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
        else:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()
            if (player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType):
            # if player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or player.SLOT_TYPE_STONE_INVENTORY:

                SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                DstSlotNumber = SlotIndex

                itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
                item.SelectItem(itemID)

                if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
                    mouseModule.mouseController.DeattachObject()
                    return

                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
            if app.WJ_SPLIT_INVENTORY_SYSTEM:
                if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
                    attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                    SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                    DstSlotNumber = SlotIndex
        mouseModule.mouseController.DeattachObject()

    def SelectOwnerItemSlot(self, SlotIndex):

        if player.ITEM_MONEY == mouseModule.mouseController.GetAttachedItemIndex():

            money = mouseModule.mouseController.GetAttachedItemCount()
            net.SendExchangeElkAddPacket(money)

212. Satır :
Python:
itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
 
SelectOwnerEmptySlot fonksiyonun tamamını da verebilir misiniz :oops:

Python:
            if app.WJ_SPLIT_INVENTORY_SYSTEM:
                if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
                    attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                    SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                    DstSlotNumber = SlotIndex

Bu kodları da bir tab ileri atın
 
Python:
    def SelectOwnerEmptySlot(self, SlotIndex):
        if FALSE == mouseModule.mouseController.isAttached():
            return

        if mouseModule.mouseController.IsAttachedMoney():
            net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
        else:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()
            if (player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType):
            # if player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or player.SLOT_TYPE_STONE_INVENTORY:

                SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                DstSlotNumber = SlotIndex

                itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
                item.SelectItem(itemID)

                if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
                    mouseModule.mouseController.DeattachObject()
                    return

                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
            if app.WJ_SPLIT_INVENTORY_SYSTEM:
                if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
                    attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                    SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                    DstSlotNumber = SlotIndex
        mouseModule.mouseController.DeattachObject()

    def SelectOwnerItemSlot(self, SlotIndex):

        if player.ITEM_MONEY == mouseModule.mouseController.GetAttachedItemIndex():

            money = mouseModule.mouseController.GetAttachedItemCount()
            net.SendExchangeElkAddPacket(money)

    def RefreshOwnerSlot(self):
        for i in xrange(exchange.EXCHANGE_ITEM_MAX_NUM):
            itemIndex = exchange.GetItemVnumFromSelf(i)
            itemCount = exchange.GetItemCountFromSelf(i)
            if 1 == itemCount:
                itemCount = 0
            self.OwnerSlot.SetItemSlot(i, itemIndex, itemCount)
        self.OwnerSlot.RefreshSlot()
 
Bi önceki mesajımda dediğim yeri bi tab ileriye atın
 
Bir dakika galiba sorunu çözdüm. Bir tab ileri atmanız bir şey değiştirmeyecek. Zaten o da bi hataydı ama gözüme başka çarptı. SelectOwnerEmptySlot fonksiyonunu komple şöyle değiştirin;
Python:
    def SelectOwnerEmptySlot(self, SlotIndex):
        if FALSE == mouseModule.mouseController.isAttached():
            return
        if mouseModule.mouseController.IsAttachedMoney():
            net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
        else:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()
        
            if player.SLOT_TYPE_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:

                attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                DstSlotNumber = SlotIndex

                itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
                item.SelectItem(itemID)
                if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
                    mouseModule.mouseController.DeattachObject()
                    return
                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)

        mouseModule.mouseController.DeattachObject()
 
Dediğinizi yaptım manzara böyle oldu fakat oyuna giremiyorum.
Yanlış mı yaptım anlamadım ki

Python:
    def SelectOwnerEmptySlot(self, SlotIndex):
        if FALSE == mouseModule.mouseController.isAttached():
            return
        if mouseModule.mouseController.IsAttachedMoney():
            net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
        else:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()

            if player.SLOT_TYPE_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:

                attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                DstSlotNumber = SlotIndex

                itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
                item.SelectItem(itemID)
                if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
                    mouseModule.mouseController.DeattachObject()
                    return
                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)

        mouseModule.mouseController.DeattachObject()

                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
                if app.WJ_SPLIT_INVENTORY_SYSTEM:
                    if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
                        attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                        SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                        DstSlotNumber = SlotIndex
        mouseModule.mouseController.DeattachObject()
 
Yanlış eklemişsiniz. Verdiğim kodu olduğu gibi mevcut kodlarınızla değiştiriniz

Sonuna eklediğiniz şu kodları silin;
Python:
                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
                if app.WJ_SPLIT_INVENTORY_SYSTEM:
                    if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
                        attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                        SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                        DstSlotNumber = SlotIndex
        mouseModule.mouseController.DeattachObject()

Zaten bu kontrolü yapan kod var. Tekrar olduğu için sistem hata vermiş. Bende komple düzenleyip vermiştim. Hiçbir değişiklik yapmadan olduğu gibi değiştirin
 
Yanlış eklemişsiniz. Verdiğim kodu olduğu gibi mevcut kodlarınızla değiştiriniz

Sonuna eklediğiniz şu kodları silin;
Python:
                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
                if app.WJ_SPLIT_INVENTORY_SYSTEM:
                    if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                        player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
                        attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                        SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                        DstSlotNumber = SlotIndex
        mouseModule.mouseController.DeattachObject()

Zaten bu kontrolü yapan kod var. Tekrar olduğu için sistem hata vermiş. Bende komple düzenleyip vermiştim. Hiçbir değişiklik yapmadan olduğu gibi değiştirin

Yalnız orada ki WJ SPLIt benim güncel Ek envanterimin kodları.
şu şekilde bir düzenleme yaptım
Python:
    def SelectOwnerEmptySlot(self, SlotIndex):
        if FALSE == mouseModule.mouseController.isAttached():
            return

        if mouseModule.mouseController.IsAttachedMoney():
            net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
        else:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()

            if app.WJ_SPLIT_INVENTORY_SYSTEM:
                if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
                    attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)

                SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                DstSlotNumber = SlotIndex

                itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
                item.SelectItem(itemID)

                if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
                    mouseModule.mouseController.DeattachObject()
                    return

                net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)

        mouseModule.mouseController.DeattachObject()
 
O şekilde de hata olur. Bu sefer envanter kontrolünü kaldırmış oluyorsunuz. Zaten k envanteri kullanacaksanız app.WJ kısmını kaldırın gitsin. İlla o kontrol olsun diyorsanız şunu deneyin;
Python:
    def SelectOwnerEmptySlot(self, SlotIndex):
        if FALSE == mouseModule.mouseController.isAttached():
            return
        if mouseModule.mouseController.IsAttachedMoney():
            net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
        else:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()
            if app.WJ_SPLIT_INVENTORY_SYSTEM:
                if player.SLOT_TYPE_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
   
                    attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                    SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                    DstSlotNumber = SlotIndex
   
                    itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
                    item.SelectItem(itemID)
                    if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
                        mouseModule.mouseController.DeattachObject()
                        return
                    net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
            else:
                if (player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType):

                    attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
                    SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
                    DstSlotNumber = SlotIndex
   
                    itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
                    item.SelectItem(itemID)
   
                    if item.IsAntiFlag(item.ANTIFLAG_GIVE):
                        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
                        mouseModule.mouseController.DeattachObject()
                        return
   
                    net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
        mouseModule.mouseController.DeattachObject()
 
Çözüm
Ne yaptığınızı anladım ya tamam tamam :D WJ splitin içeriğini eski ek envanter ile değiştirdiniz. orda "İF WJ SPLİT" tagını görmeyince yanlış anlaşıldım sandım. tamam sorunum çözüldü Teşekkürler adminimm <3 <3
 
Konuda ki ilk mesajda ki kodları ile son kodları incelerseniz hata belli oluyor zaten.
attachedInvenType adında bir şeyi kullanmaya çalışıyor ama daha aşağıda ki satırlarda oluşturduğu için syserr veriyordu.
Bu arada son mesajda verdiğim kodda ufak bi değişiklik yaptım. Onu da almayı unutmayın :)
 
Konuda ki ilk mesajda ki kodları ile son kodları incelerseniz hata belli oluyor zaten.
attachedInvenType adında bir şeyi kullanmaya çalışıyor ama daha aşağıda ki satırlarda oluşturduğu için syserr veriyordu.
Bu arada son mesajda verdiğim kodda ufak bi değişiklik yaptım. Onu da almayı unutmayın :)
Tamamdır Teşekkür ederim :)
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst