Jump to content

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
https://metin2.dev/topic/31409-int-object-has-no-attribute-setitemslot-error/
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Contributor

Open uiInventory and go to line 873. If you don't know how to fix it, post the file or the function here(RefreshBagSlotWindow).

You're basically trying to call SetItemSlot on an integer.

2 hours ago, Amun said:

Open uiInventory and go to line 873. If you don't know how to fix it, post the file or the function here(RefreshBagSlotWindow).

You're basically trying to call SetItemSlot on an integer.

Here's uiinventory: https://pastebin.com/hvBVnFAd 

  • 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
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?

  • 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

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)

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

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.