Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

[Python] list index out of range


FlorinMarian

Question

  • Premium

Hi, guys!

I've tried to fix it by myself but life shown me again I'm not enough experienced in python yet.

The error:

0713 16:00:27609 :: Traceback (most recent call last):

0713 16:00:27609 ::   File "ui.py", line 2130, in OnOverInItem

0713 16:00:27609 ::   File "ui.py", line 92, in __call__

0713 16:00:27609 ::   File "ui.py", line 83, in __call__

0713 16:00:27609 ::   File "uiInventory.py", line 1385, in OverInItem

0713 16:00:27609 ::   File "uiInventory.py", line 1652, in ShowToolTip

0713 16:00:27609 ::   File "uiToolTip.py", line 610, in SetInventoryItem

0713 16:00:27609 ::   File "uiToolTip.py", line 1665, in AddItemData

0713 16:00:27609 :: IndexError
0713 16:00:27609 :: : 
0713 16:00:27609 :: list index out of range
0713 16:00:27609 :: 

ui.py:  Click here

uiiventory.py: Click here

uitooltip.py: Click here

Thank you !

  • Metin2 Dev 1
  • Think 1
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
  • Premium

You also changed the file after got the syserr so we have different lines.

Spoiler

self.__AppendPetAgeAndLevelInformation(metinSlot[2], metinSlot[3])

You have more than 3 sockets?

 

Ps. ambiguous use of round brackets.

  • Love 1
Link to comment
Share on other sites

  • 0
  • Premium
2 hours ago, WeedHex said:

You also changed the file after got the syserr so we have different lines.

  Reveal hidden contents

self.__AppendPetAgeAndLevelInformation(metinSlot[2], metinSlot[3])

You have more than 3 sockets?

 

Ps. ambiguous use of round brackets.

Just 3 sockets (by default).

The bug comes from Growth pet system.

Thank you!

  • Good 1
Link to comment
Share on other sites

  • 0
  • Distinguished Member

Then modify the line what WeedHex quoted with the correct sockets since now it hands over the 3rd (metinSlot[2]) and 4th (metinSlot[3]) socket to __AppendPetAgeAndLevelInformation while the 4th socket does not exists. (The socket starts with [0].)

See this: def __AppendPetAgeAndLevelInformation(self, level, age): It waits the level first then the age.

Let's say you store the level in the 2nd socket and the age in the 3rd socket then use this code:

self.__AppendPetAgeAndLevelInformation(metinSlot[1], metinSlot[2])

If you store the level in the 1st and age in the 2nd socket then use this code:

self.__AppendPetAgeAndLevelInformation(metinSlot[0], metinSlot[1])

If you don't know where do you store them you can check it by opening the item table and look for a Growth pet, you can also check in your source code.

Edited by TMP4
  • Love 2
Link to comment
Share on other sites

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.