Jump to content

[Python] list index out of range


Recommended Posts

  • 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

  • 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

  • Contributor

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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