KOrgaz 0 Posted November 3, 2019 Share Posted November 3, 2019 (edited) Hey guys, I'm using the Fliege v2.1 files and when I'm trying to add a stone to a weapon or armor, I get this error and nothing happens. Does anyone know how to fix it? Spoiler 1103 18:54:08899 :: invalid idx 0 1103 18:55:30737 :: Cannot find item by -1 1103 18:55:30737 :: ui:2241: RuntimeWarning: tp_compare didn't return -1 or -2 for exception 1103 18:55:30737 :: Traceback (most recent call last): 1103 18:55:30738 :: File "ui.py", line 1800, in OnSelectItemSlot 1103 18:55:30738 :: File "ui.py", line 83, in __call__ 1103 18:55:30738 :: File "ui.py", line 74, in __call__ 1103 18:55:30738 :: File "uiInventory.py", line 677, in SelectItemSlot 1103 18:55:30738 :: File "uiInventory.py", line 735, in __DropSrcItemToDestItemInInventory 1103 18:55:30738 :: File "uiInventory.py", line 889, in AttachMetinToItem 1103 18:55:30738 :: File "uiAttachMetin.py", line 107, in Open 1103 18:55:30738 :: File "uiToolTip.py", line 1163, in AddItemData 1103 18:55:30738 :: File "uiToolTip.py", line 1897, in __AppendMetinSlotInfo 1103 18:55:30739 :: File "uiToolTip.py", line 1919, in __AppendMetinSlotInfo_AppendMetinSocketData 1103 18:55:30739 :: File "uiToolTip.py", line 124, in AppendSpace 1103 18:55:30739 :: File "uiToolTip.py", line 233, in ResizeToolTip 1103 18:55:30739 :: File "ui.py", line 2241, in SetSize 1103 18:55:30740 :: TypeError 1103 18:55:30740 :: : 1103 18:55:30740 :: an integer is required 1103 18:55:30740 :: The ui.py part, that's faulty. I marked the Line 2241. class ThinBoard(Window): CORNER_WIDTH = 16 CORNER_HEIGHT = 16 LINE_WIDTH = 16 LINE_HEIGHT = 16 BOARD_COLOR = grp.GenerateColor(0.0, 0.0, 0.0, 0.51) LT = 0 LB = 1 RT = 2 RB = 3 L = 0 R = 1 T = 2 B = 3 def __init__(self, layer = "UI"): Window.__init__(self, layer) CornerFileNames = [ "d:/ymir work/ui/pattern/ThinBoard_Corner_"+dir+".tga" for dir in ["LeftTop","LeftBottom","RightTop","RightBottom"] ] LineFileNames = [ "d:/ymir work/ui/pattern/ThinBoard_Line_"+dir+".tga" for dir in ["Left","Right","Top","Bottom"] ] self.Corners = [] for fileName in CornerFileNames: Corner = ExpandedImageBox() Corner.AddFlag("attach") Corner.AddFlag("not_pick") Corner.LoadImage(fileName) Corner.SetParent(self) Corner.SetPosition(0, 0) Corner.Show() self.Corners.append(Corner) self.Lines = [] for fileName in LineFileNames: Line = ExpandedImageBox() Line.AddFlag("attach") Line.AddFlag("not_pick") Line.LoadImage(fileName) Line.SetParent(self) Line.SetPosition(0, 0) Line.Show() self.Lines.append(Line) Base = Bar() Base.SetParent(self) Base.AddFlag("attach") Base.AddFlag("not_pick") Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT) Base.SetColor(self.BOARD_COLOR) Base.Show() self.Base = Base self.Lines[self.L].SetPosition(0, self.CORNER_HEIGHT) self.Lines[self.T].SetPosition(self.CORNER_WIDTH, 0) def __del__(self): Window.__del__(self) if app.ENABLE_TARGET_INFO: def ShowCorner(self, corner): self.Corners[corner].Show() self.SetSize(self.GetWidth(), self.GetHeight()) def HideCorners(self, corner): self.Corners[corner].Hide() self.SetSize(self.GetWidth(), self.GetHeight()) def ShowLine(self, line): self.Lines[line].Show() self.SetSize(self.GetWidth(), self.GetHeight()) def HideLine(self, line): self.Lines[line].Hide() self.SetSize(self.GetWidth(), self.GetHeight()) def SetSize(self, width, height): width = max(self.CORNER_WIDTH*2, width) #Line 2241 height = max(self.CORNER_HEIGHT*2, height) Window.SetSize(self, width, height) self.Corners[self.LB].SetPosition(0, height - self.CORNER_HEIGHT) self.Corners[self.RT].SetPosition(width - self.CORNER_WIDTH, 0) self.Corners[self.RB].SetPosition(width - self.CORNER_WIDTH, height - self.CORNER_HEIGHT) self.Lines[self.R].SetPosition(width - self.CORNER_WIDTH, self.CORNER_HEIGHT) self.Lines[self.B].SetPosition(self.CORNER_HEIGHT, height - self.CORNER_HEIGHT) verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH self.Lines[self.L].SetRenderingRect(0, 0, 0, verticalShowingPercentage) self.Lines[self.R].SetRenderingRect(0, 0, 0, verticalShowingPercentage) self.Lines[self.T].SetRenderingRect(0, 0, horizontalShowingPercentage, 0) self.Lines[self.B].SetRenderingRect(0, 0, horizontalShowingPercentage, 0) self.Base.SetSize(width - self.CORNER_WIDTH*2, height - self.CORNER_HEIGHT*2) def ShowInternal(self): self.Base.Show() for wnd in self.Lines: wnd.Show() for wnd in self.Corners: wnd.Show() def HideInternal(self): self.Base.Hide() for wnd in self.Lines: wnd.Hide() for wnd in self.Corners: wnd.Hide() Kind regards, Korgaz Edited November 4, 2019 by KOrgaz Added the UI part Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now