Jump to content

BUILD_OnMouseLeftButtonUp Error


Recommended Posts

Hi, 

i have this crash syserr error:

 

1101 00:10:34518 :: Traceback (most recent call last):

1101 00:10:34518 ::   File "game.py", line 1357, in OnMouseLeftButtonUp

1101 00:10:34518 :: AttributeError
1101 00:10:34519 :: : 
1101 00:10:34519 :: 'NoneType' object has no attribute 'BUILD_OnMouseLeftButtonUp'
1101 00:10:34519 :: 

 

game.py

 

def OnMouseLeftButtonUp(self):

		if self.interface.BUILD_OnMouseLeftButtonUp():  //1357
			return

		if mouseModule.mouseController.isAttached():

			attachedType = mouseModule.mouseController.GetAttachedType()
			attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
			attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
			attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()

			## QuickSlot
			if player.SLOT_TYPE_QUICK_SLOT == attachedType:
				player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)

			elif player.SLOT_TYPE_INVENTORY == attachedType:


				if player.ITEM_MONEY == attachedItemIndex:
					self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
				elif player.ITEM_CHEQUE == attachedItemIndex:
					self.__PutCheque(attachedType, attachedItemCount, self.PickingCharacterIndex)
				else:
					self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)

			## DragonSoul
			elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
				self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
			
			elif player.SLOT_TYPE_INVENTORY == attachedType or\
				player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedType or\
				player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedType or\
				player.SLOT_TYPE_STONE_INVENTORY == attachedType or\
				player.SLOT_TYPE_BOX_INVENTORY == attachedType or\
				player.SLOT_TYPE_EFSUN_INVENTORY == attachedType or\
				player.SLOT_TYPE_CICEK_INVENTORY == attachedType:
				self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
			
			mouseModule.mouseController.DeattachObject()

		else:
			hyperlink = ui.GetHyperlink()
			if hyperlink:
				if app.IsPressed(app.DIK_LALT):
					link = chat.GetLinkFromHyperlink(hyperlink)
					ime.PasteString(link)
				else:
					self.interface.MakeHyperlinkTooltip(hyperlink)
				return
			else:
				player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
				
		#player.EndMouseWalking()
		return True

 

interfacemodule.py

 

def BUILD_OnMouseLeftButtonUp(self):
		if not self.wndGuildBuilding:
			return

		if not self.wndGuildBuilding.IsPreviewMode():
			return True

		return False

 

Could you help me solve this error? Thanks.

Link to comment
Share on other sites

  • Developer

try by replacing this:
 

if self.interface.BUILD_OnMouseLeftButtonUp():  //1357
	return

 

with this:

if self.interface and self.interface.BUILD_OnMouseLeftButtonUp():  //1357
	return

 

 

It's strange to got an error where self.interface is None, you should invastigate to find the real cause of this.

 

Edited by Ikarus_
  • Love 1

My youtube channel  on which you can see my works here

Link to comment
Share on other sites

2 hours ago, Ikarus_ said:

try by replacing this:
 



if self.interface.BUILD_OnMouseLeftButtonUp():  //1357
	return

 

with this:



if self.interface and self.interface.BUILD_OnMouseLeftButtonUp():  //1357
	return

 

 

It's strange to got an error where self.interface is None, you should invastigate to find the real case of this.

 

Thanks it works!

how can i find the real problem?

 

Edited by AKUROS
Link to comment
Share on other sites

  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.