Python Problem Tooltip

07/06/2016 20:12 EisTee,#1
Hallo Liebe Community,

Ich hab sowas ähnliches wie ein Wiki wenn man über das Item mit Maus drüber fährt wurde dann ja die Bonis und so des Items angezeigt aber seid dem ich das Schulterbandsystem drin hab kommt mir der Fehler:

Code:

0706 20:09:38364 :: IndexError
0706 20:09:38364 :: : 
0706 20:09:38364 :: list index out of range
0706 20:09:38364 :: 

0706 20:09:38528 :: Traceback (most recent call last):

0706 20:09:38528 ::   File "ui.py", line 853, in OnMouseOverIn

0706 20:09:38528 ::   File "ui.py", line 87, in __call__

0706 20:09:38528 ::   File "ui.py", line 69, in __call__

0706 20:09:38529 ::   File "wiki.py", line 407, in ShowToolTips

0706 20:09:38529 ::   File "uiToolTip.py", line 874, in AddRefineItemData

0706 20:09:38529 ::   File "uiToolTip.py", line 943, in AddItemData

0706 20:09:38529 ::   File "uiToolTip.py", line 1337, in __AdjustMaxWidth

0706 20:09:38530 ::   File "uiToolTip.py", line 1349, in __AdjustAttrMaxWidth

0706 20:09:38530 :: IndexError
0706 20:09:38530 :: : 
0706 20:09:38530 :: list index out of range
0706 20:09:38530 ::
Davor ging es. Hab schon vieles versucht, hab aber die Vermutung das der Fehler aufgetaucht ist da im Source dieser eintrag geändert wurde ITEM_ATTRIBUTE_MAX_NUM = 15,
und hier 14 nur stehen hab schon versucht das da zu ändern aber ohne erfolg
Code:
		self.toolTip.AddRefineItemData(int(tool[0]), [int(tool[15]), int(tool[16]), int(tool[17])], [(int(tool[1]), int(tool[2])), (int(tool[3]), int(tool[4])), (int(tool[5]), int(tool[6])), (int(tool[7]), int(tool[8])), (int(tool[9]), int(tool[10])), (int(tool[11]), int(tool[12])), (int(tool[13]), int(tool[14])), 0]) # Item ID
07/06/2016 21:41 mrapc#2
Demnach Stört er sich an ein paar Werten hier:
self.toolTip.AddRefineItemData(int(tool[0]), [int(tool[15]), int(tool[16]), int(tool[17])], [(int(tool[1]), int(tool[2])), (int(tool[3]), int(tool[4])), (int(tool[5]), int(tool[6])), (int(tool[7]), int(tool[8])), (int(tool[9]), int(tool[10])), (int(tool[11]), int(tool[12])), (int(tool[13]), int(tool[14])), 0]) # Item ID

dein Problem ist ja list index out of range, was bedeutet das dein array/deine Liste nicht die größe hat mit der ein Wert aufgerufen wird.
Du kannst natürlich probieren niedrigere Werte zu nehmen oder aber mittels eines Ifs zu große Werte erst einmal abfangen.
07/06/2016 22:19 EisTee,#3
Quote:
Originally Posted by mrapc View Post
Demnach Stört er sich an ein paar Werten hier:
self.toolTip.AddRefineItemData(int(tool[0]), [int(tool[15]), int(tool[16]), int(tool[17])], [(int(tool[1]), int(tool[2])), (int(tool[3]), int(tool[4])), (int(tool[5]), int(tool[6])), (int(tool[7]), int(tool[8])), (int(tool[9]), int(tool[10])), (int(tool[11]), int(tool[12])), (int(tool[13]), int(tool[14])), 0]) # Item ID

dein Problem ist ja list index out of range, was bedeutet das dein array/deine Liste nicht die größe hat mit der ein Wert aufgerufen wird.
Du kannst natürlich probieren niedrigere Werte zu nehmen oder aber mittels eines Ifs zu große Werte erst einmal abfangen.
Hab alle werte auf 1 gestellt gleicher Fehler. Aber wie gesagt der Fehler ist erst aufgetaucht seid dem das Schulterbandsystem drine ist.
07/07/2016 16:17 LxR'EsoZiaL#4
und wie kommt deine tool Variable zustande? Die ist der Fehler. Mit diesem Zeilen Schnippsel kann hier niemand was anfangen.