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_
  • 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
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

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