Question

Version des fichiers/ Type d'émulateur : RoyalServer

Domaine (Base de données, Client, Core...) :Client

Votre niveau (Débutant, Intermédiaire, Avancé..) : Debutant

 

Description du problème : J'ai essayer d'implanter le system detruire d'item qui est deja partager sur FE , mais quand j'essay de drop un item rien ne se passe le dialogue du drop n'ouvre pas et sa me donner ce syserr 

0119 19:12:24273 :: Traceback (most recent call last):

0119 19:12:24273 ::   File "game.py", line 1499, in OnMouseLeftButtonUp

0119 19:12:24274 ::   File "game.py", line 1536, in __PutItem

0119 19:12:24274 :: AttributeError
0119 19:12:24274 :: : 
0119 19:12:24274 :: 'GameWindow' object has no attribute '_GameWindow__DropItem'
0119 19:12:24274 :: 

Comment reproduire le problème ? : -

Recherches et tests effectués : Jai essayer de prendre les lignes ou sa me dit qu'il ya un erreur dans le syserr d'un client qui a deja implanter le system , mais rien .. meme problem , je sais pas vraiment d'ou sa vien , ou bien ou je dois chercher pour le resoudre

 

Screenshot du problème concerné :-

 

En postant ma demande d'aide, j'affirme avoir lu et accepté le Règlement de Funky-Emulation.

Edited by FrancH

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Salut !
File "game.py", line 1536, in __PutItem

Montre nous ce bout de code, visiblement tu essayes d'accéder à quelque chose qui n'existe pas.

Share this post


Link to post
Share on other sites
  • 0

  

1481	def OnMouseLeftButtonUp(self):
1482
1483		if self.interface.BUILD_OnMouseLeftButtonUp():
1484			return
1485
1486		if mouseModule.mouseController.isAttached():
1487
1488			attachedType = mouseModule.mouseController.GetAttachedType()
1489			attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
1490			attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
1491			attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
1492
1493			## Inventory
1494			if player.SLOT_TYPE_INVENTORY == attachedType:
1495
1496				if player.ITEM_MONEY == attachedItemIndex:
1497					self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
1498				else:
1499					self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
1500
1501			## DragonSoul
1502			elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
1503				self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
1504
1505			mouseModule.mouseController.DeattachObject()
1506
1507		else:
1508			hyperlink = ui.GetHyperlink()
1509			if hyperlink:
1510				if app.IsPressed(app.DIK_LALT):
1511					link = chat.GetLinkFromHyperlink(hyperlink)
1512					ime.PasteString(link)
1513				else:
1514					self.interface.MakeHyperlinkTooltip(hyperlink)
1515				return
1516			else:
1517				player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
1518
1519		#player.EndMouseWalking()
1520		return TRUE
1521
1522	def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
1523		if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
1524			attachedInvenType = player.SlotTypeToInvenType(attachedType)
1525			if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
1526				if player.IsEquipmentSlot(attachedItemSlotPos) and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedType:
1527					self.stream.popupWindow.Close()
1528					self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
1529				else:
1530					if chr.IsNPC(dstChrID):
1531						net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
1532					else:
1533						net.SendExchangeStartPacket(dstChrID)
1534						net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
1535			else:
1536				self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)

c la partie d'ou le syserr vien , il tous le syserr ici , essayer de m'aider 😛 car vraiment jai essayer bcp et rien .. 

Share this post


Link to post
Share on other sites
  • 0

Hum, tu peux me monter ta fonction __DropItem (game.py) ? Enfin si tu l'as pour le coup.... 

 

Share this post


Link to post
Share on other sites
  • 0

j'en ai def requestdropitem 

 

    def RequestDropItem(self, answer): 
        if not self.itemDropQuestionDialog:
            return

        if answer:
            dropType = self.itemDropQuestionDialog.dropType
            dropCount = self.itemDropQuestionDialog.dropCount
            dropNumber = self.itemDropQuestionDialog.dropNumber

            if player.SLOT_TYPE_INVENTORY == dropType:
                if dropNumber == player.ITEM_MONEY:
                    net.SendGoldDropPacketNew(dropCount)
                    snd.PlaySound("sound/ui/money.wav")
                else:
                    # PRIVATESHOP_DISABLE_ITEM_DROP
                    self.__SendDropItemPacket(dropNumber, dropCount)
                    # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
            elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
                    # PRIVATESHOP_DISABLE_ITEM_DROP
                    self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
                    # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP

        self.itemDropQuestionDialog.Close()
        self.itemDropQuestionDialog = None

Share this post


Link to post
Share on other sites
  • 0

C'est pas cette fonction là que je te demande...

	def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
		# PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
		if uiPrivateShopBuilder.IsBuildingPrivateShop():			
			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
			return
		# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
		
		if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
			self.stream.popupWindow.Close()
			self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)

		else:
			if player.SLOT_TYPE_INVENTORY == attachedType:
				dropItemIndex = player.GetItemIndex(attachedItemSlotPos)

				item.SelectItem(dropItemIndex)
				dropItemName = item.GetItemName()

				## Question Text
				questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)

				## Dialog
				itemDropQuestionDialog = uiCommon.QuestionDialog()
				itemDropQuestionDialog.SetText(questionText)
				itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
				itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
				itemDropQuestionDialog.Open()
				itemDropQuestionDialog.dropType = attachedType
				itemDropQuestionDialog.dropNumber = attachedItemSlotPos
				itemDropQuestionDialog.dropCount = attachedItemCount
				self.itemDropQuestionDialog = itemDropQuestionDialog

				constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
			elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
				dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)

				item.SelectItem(dropItemIndex)
				dropItemName = item.GetItemName()

				## Question Text
				questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)

				## Dialog
				itemDropQuestionDialog = uiCommon.QuestionDialog()
				itemDropQuestionDialog.SetText(questionText)
				itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
				itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
				itemDropQuestionDialog.Open()
				itemDropQuestionDialog.dropType = attachedType
				itemDropQuestionDialog.dropNumber = attachedItemSlotPos
				itemDropQuestionDialog.dropCount = attachedItemCount
				self.itemDropQuestionDialog = itemDropQuestionDialog

				constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)

 

Share this post


Link to post
Share on other sites
  • 0

networkModule.SetLoadingPhase - <type 'exceptions.SyntaxError'>:invalid syntax (game.py, line 1640) xd quand je lai ajouter 

 

1640    def __DropItem (self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):

vien discord aufaite pour qu'on continue pas entrain de parler ici xd 

Share this post


Link to post
Share on other sites
  • 0

Vous pouvez continuez ici, les étapes effectués pourrons aider quelqu'un qui, dans le futur aura le même probléme, + Vous êtes dans la bonne section.

Share this post


Link to post
Share on other sites
  • 0

0120 14:55:25239 :: Traceback (most recent call last):

0120 14:55:25239 ::   File "game.py", line 1500, in OnMouseLeftButtonUp

0120 14:55:25239 ::   File "game.py", line 1537, in __PutItem

0120 14:55:25240 ::   File "game.py", line 1610, in __DropItem

0120 14:55:25240 :: AttributeError
0120 14:55:25240 :: : 
0120 14:55:25240 :: 'QuestionDialog_drop' object has no attribute 'SetDestroyEvent'
0120 14:55:25240 :: 

nouvo problem xD 

c bonn merci si qqun en a besoin d'aide pour l'ajouter je suis ici , inbox 

 

Sujet a close ❤️ 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.