Jump to content

'int' object has no attribute 'SetItemSlot' - Error


Recommended Posts

Hi, i have this error everytime i teleport or closing the client. I don't understand what's trigger it (i was using a teleport system and didn't have any problem with teleporting, but now i don't like it). Here's the error:
 

networkModule.py(line:236) SetLoadingPhase
networkModule.py(line:121) SetPhaseWindow
networkModule.py(line:130) __ChangePhaseWindow
game.py(line:360) Close
interfaceModule.py(line:715) Close
uiShop.py(line:182) Destroy
uiShop.py(line:263) Close
interfaceModule.py(line:2686) RefreshMarkInventoryBag
uiInventory.py(line:873) RefreshBagSlotWindow

networkModule.SetLoadingPhase - <type 'exceptions.AttributeError'>:'int' object has no attribute 'SetItemSlot'

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Contributor

You're calling it after the inventory has been destroyed.

In uiInventory you'll find:

def Destroy(self):
  	...
	self.wndItem = 0
    ...

Which would explain the method call on an integer.

 

To fix it:

InterfaceModule.py

        def RefreshMarkInventoryBag(self):
            if self.wndInventory and self.wndInventory.IsShow():
                self.wndInventory.RefreshBagSlotWindow()

 

Edited by Amun
Link to comment
Share on other sites

2 hours ago, Amun said:

You're calling it after the inventory has been destroyed.

In uiInventory you'll find:

def Destroy(self):
  	...
	self.wndItem = 0
    ...

Which would explain the method call on an integer.

 

To fix it:

InterfaceModule.py

        def RefreshMarkInventoryBag(self):
            if self.wndInventory and self.wndInventory.IsShow():
                self.wndInventory.RefreshBagSlotWindow()

 

I already have that function in interface 

 


		def RefreshMarkInventoryBag(self):
			if self.wndInventory and self.wndInventory.IsShow():
				self.wndInventory.RefreshBagSlotWindow()

			if app.ENABLE_SPECIAL_INVENTORY:
				if self.wndSpecialInventory and self.wndSpecialInventory.IsShow():
					self.wndSpecialInventory.RefreshBagSlotWindow()

So what's wrong? Is there a thing that i miss somewhere?

Link to comment
Share on other sites

  • Contributor

Well, then you're either calling "Destroy" on the inventory and don't invalidate it(inv = None), or you're calling Destroy somewhere else, in which case __LoadWindwo() ain't going to work because isLoaded = 1, or because of some other dumb shit that's happening because you fucked up.

Try adding self.isLoaded = 0 in def Destroy(self). It'll allow __LoadWindow to run again and maybe that'll fix it(although I propose you look for what's causing it)

Anyhow.. I can't check your entire client, good luck

Link to comment
Share on other sites

On 10/3/2023 at 3:56 PM, Amun said:

Well, then you're either calling "Destroy" on the inventory and don't invalidate it(inv = None), or you're calling Destroy somewhere else, in which case __LoadWindwo() ain't going to work because isLoaded = 1, or because of some other dumb shit that's happening because you fucked up.

Try adding self.isLoaded = 0 in def Destroy(self). It'll allow __LoadWindow to run again and maybe that'll fix it(although I propose you look for what's causing it)

Anyhow.. I can't check your entire client, good luck

I tried adding self.isLoaded = 0, but it doesn't help. I don't know what caused it, i've tried compared all the py files with the og ones but i guess it's caused by the Dragon Soul (maybe)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



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.