Jump to content
  • 0

BUILD_OnMouseLeftButtonUp Error


AKUROS

Question

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 post

2 answers to this question

Recommended Posts

  • 0

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_ (see edit history)
  • Love 1

My youtube channel  on which you can see my works here

Link to post
  • 0
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 (see edit history)
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.