Çözüldü BoardWithTitleBar' object has no attribute 'SetOnMouseLeftButtonUpEvent'

  • Konuyu açan Konuyu açan Ehveniser
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 29
  • Gösterim Gösterim 421
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

Ehveniser

🅹 🅾 🅺 🅴 🆁
Premium Üye
Geliştirici
Usta Üye
Mesaj
353
Çözümler
24
Beğeni
571
Puan
849
Ticaret Puanı
0
Selamlar,

@YunusEmreOfficial hocamın "Detaylı Mob Target İnfo Tam Sistem" konusunu ekliyordum aşağıdaki şekilde syserr alıyorum.
Sorun nerede olabilir?

syserr:
Genişlet Daralt Kopyala
1102 15:55:10162 :: Traceback (most recent call last):

1102 15:55:10162 ::   File "networkModule.py", line 306, in SetGamePhase

1102 15:55:10163 ::   File "game.py", line 86, in __init__

1102 15:55:10163 ::   File "interfaceModule.py", line 366, in MakeInterface

1102 15:55:10163 ::   File "interfaceModule.py", line 219, in __MakeWindows

1102 15:55:10163 ::   File "uiMiniMap.py", line 223, in __init__

1102 15:55:10163 ::   File "uiMiniMap.py", line 112, in LoadWindow

1102 15:55:10163 :: AttributeError
1102 15:55:10163 :: :
1102 15:55:10163 :: 'BoardWithTitleBar' object has no attribute 'SetOnMouseLeftButtonUpEvent'
1102 15:55:10163 ::
 
Kod:
Genişlet Daralt Kopyala
Class BoardWithTitleBar
sınıfında
Kod:
Genişlet Daralt Kopyala
def SetOnMouseLeftButtonUpEvent
fonksiyonu eksik.
 
Selamlar,

@YunusEmreOfficial hocamın "Detaylı Mob Target İnfo Tam Sistem" konusunu ekliyordum aşağıdaki şekilde syserr alıyorum.
Sorun nerede olabilir?

syserr:
Genişlet Daralt Kopyala
1102 15:55:10162 :: Traceback (most recent call last):

1102 15:55:10162 ::   File "networkModule.py", line 306, in SetGamePhase

1102 15:55:10163 ::   File "game.py", line 86, in __init__

1102 15:55:10163 ::   File "interfaceModule.py", line 366, in MakeInterface

1102 15:55:10163 ::   File "interfaceModule.py", line 219, in __MakeWindows

1102 15:55:10163 ::   File "uiMiniMap.py", line 223, in __init__

1102 15:55:10163 ::   File "uiMiniMap.py", line 112, in LoadWindow

1102 15:55:10163 :: AttributeError
1102 15:55:10163 :: :
1102 15:55:10163 :: 'BoardWithTitleBar' object has no attribute 'SetOnMouseLeftButtonUpEvent'
1102 15:55:10163 ::
Merhaba,
Ui.py de eklemelerini kontrol et değiştir dediğim kısımda hata veriyor. Tab hatası olabilr.
 
Kod:
Genişlet Daralt Kopyala
Class BoardWithTitleBar
sınıfında
Kod:
Genişlet Daralt Kopyala
def SetOnMouseLeftButtonUpEvent
fonksiyonu eksik.
Sistemin bununla bir alakası yok ama öyle hata vermesini çözemedim bir türlü.

Merhaba,
Ui.py de eklemelerini kontrol et değiştir dediğim kısımda hata veriyor. Tab hatası olabilr.
Her yeri kontrol ettim ama çözemedim.
 
Sistemin bununla bir alakası yok ama öyle hata vermesini çözemedim bir türlü.


Her yeri kontrol ettim ama çözemedim.
Bazen fonksiyonun hangi classta olduğu belirtilmemişse temel classlarda arayıp böyle alakasız gözüken bir hata verebiliyor. Ancak hata sende bir classta def SetOnMouseLeftButtonUpEvent fonksiyonunun eksik olması. İlla ki Class BoardWithTitleBar'da olmak zorunda değil. Başka bir classta da eksik olabilir.
 
ui.py içerisinde
Python:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
Var bunun altında

self.onMouseLeftButtonUpEvent = None
Bu eklimi

Python:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.clickEvent = None
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        self.RegisterWindow(layer)
        self.Hide()

Örnek mesela böyle
 
ui.py içerisinde
Kod:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
Var bunun altında

self.onMouseLeftButtonUpEvent = None
Bu eklimi

Kod:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.clickEvent = None
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        self.RegisterWindow(layer)
        self.Hide()

Örnek mesela böyle

Şu şekilde ekledim ben hatalı bir şey var mı?
Bende mesela şu yok: self.clickEvent = None

ui.py:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        if app.ENABLE_MOUSEWHEEL_EVENT:
            self.onMouseWheelEvent=None
        self.RegisterWindow(layer)
        self.Hide()
        if WOC_ENABLE_PRINT_REGISTERS:
            global WocWindowRegister
            WocKey = "{}[{}]".format(self.__class__.__name__, id(self))
            try:
                WocWindowRegister[WocKey] += 1
            except:
                WocWindowRegister[WocKey] = 1
                if WOC_ENABLE_PRINT_STACK:
                    global WocWindowStack
                    WocWindowStack[WocKey] = WocGetStackList()

        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            self.mouseLeftButtonDownEvent = None
            self.mouseLeftButtonDownArgs = None
            self.mouseLeftButtonUpEvent = None
            self.mouseLeftButtonUpArgs = None
            self.mouseLeftButtonDoubleClickEvent = None
            self.mouseRightButtonDownEvent = None
            self.mouseRightButtonDownArgs = None
            self.moveWindowEvent = None
            self.renderEvent = None
            self.renderArgs = None

            self.overInEvent = None
            self.overInArgs = None

            self.overOutEvent = None
            self.overOutArgs = None

            self.baseX = 0
            self.baseY = 0

            self.SetWindowName("NONAME_Window")
 
Şu şekilde ekledim ben hatalı bir şey var mı?
Bende mesela şu yok: self.clickEvent = None

ui.py:
Genişlet Daralt Kopyala
    def __init__(self, layer = "UI"):
        self.hWnd = None
        self.parentWindow = 0
        self.onMouseLeftButtonUpEvent = None
        if app.ENABLE_MOUSEWHEEL_EVENT:
            self.onMouseWheelEvent=None
        self.RegisterWindow(layer)
        self.Hide()
        if WOC_ENABLE_PRINT_REGISTERS:
            global WocWindowRegister
            WocKey = "{}[{}]".format(self.__class__.__name__, id(self))
            try:
                WocWindowRegister[WocKey] += 1
            except:
                WocWindowRegister[WocKey] = 1
                if WOC_ENABLE_PRINT_STACK:
                    global WocWindowStack
                    WocWindowStack[WocKey] = WocGetStackList()

        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            self.mouseLeftButtonDownEvent = None
            self.mouseLeftButtonDownArgs = None
            self.mouseLeftButtonUpEvent = None
            self.mouseLeftButtonUpArgs = None
            self.mouseLeftButtonDoubleClickEvent = None
            self.mouseRightButtonDownEvent = None
            self.mouseRightButtonDownArgs = None
            self.moveWindowEvent = None
            self.renderEvent = None
            self.renderArgs = None

            self.overInEvent = None
            self.overInArgs = None

            self.overOutEvent = None
            self.overOutArgs = None

            self.baseX = 0
            self.baseY = 0

            self.SetWindowName("NONAME_Window")


Kod:
Genişlet Daralt Kopyala
#####################/*/-*/-*/*-/-*/-*/-//-/ 「RcT 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################

## Altında Bul

    def SetOnMouseLeftButtonUpEvent(self, event):
        self.onMouseLeftButtonUpEvent = ev

## Değiştir

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

Burayı nasıl ekledin ?
 
Kod:
Genişlet Daralt Kopyala
#####################/*/-*/-*/*-/-*/-*/-//-/ 「RcT 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################

## Altında Bul

    def SetOnMouseLeftButtonUpEvent(self, event):
        self.onMouseLeftButtonUpEvent = ev

## Değiştir

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

Burayı nasıl ekledin ?
ui.py:
Genişlet Daralt Kopyala
    def IsIn(self):
        return wndMgr.IsIn(self.hWnd)

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def IsInPosition(self):
            xMouse, yMouse = wndMgr.GetMousePosition()
            x, y = self.GetGlobalPosition()
            return xMouse >= x and xMouse < x + self.GetWidth() and yMouse >= y and yMouse < y + self.GetHeight()

        def SetClickEvent(self, event):
            self.clickEvent = __mem_func__(event)

        def OnMouseLeftButtonDown(self):
            if self.clickEvent:
                self.clickEvent()

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonDoubleClickEvent(self, event):
            self.mouseLeftButtonDoubleClickEvent = event

        def OnMouseLeftButtonDoubleClick(self):
            if self.mouseLeftButtonDoubleClickEvent:
                self.mouseLeftButtonDoubleClickEvent()

        def SetMouseRightButtonDownEvent(self, event, *args):
            self.mouseRightButtonDownEvent = event
            self.mouseRightButtonDownArgs = args

        def OnMouseRightButtonDown(self):
            if self.mouseRightButtonDownEvent:
                apply(self.mouseRightButtonDownEvent, self.mouseRightButtonDownArgs)

        def SetMoveWindowEvent(self, event):
            self.moveWindowEvent = event

        def OnMoveWindow(self, x, y):
            if self.moveWindowEvent:
                self.moveWindowEvent(x, y)

        def SAFE_SetOverInEvent(self, func, *args):
            self.overInEvent = __mem_func__(func)
            self.overInArgs = args

        def SetOverInEvent(self, func, *args):
            self.overInEvent = func
            self.overInArgs = args

        def SAFE_SetOverOutEvent(self, func, *args):
            self.overOutEvent = __mem_func__(func)
            self.overOutArgs = args

        def SetOverOutEvent(self, func, *args):
            self.overOutEvent = func
            self.overOutArgs = args

        def OnMouseOverIn(self):
            if self.overInEvent:
                apply(self.overInEvent, self.overInArgs)

        def OnMouseOverOut(self):
            if self.overOutEvent:
                apply(self.overOutEvent, self.overOutArgs)

        def SAFE_SetRenderEvent(self, event, *args):
            self.renderEvent = __mem_func__(event)
            self.renderArgs = args

        def ClearRenderEvent(self):
            self.renderEvent = None
            self.renderArgs = None

        def OnRender(self):
            if self.renderEvent:
                apply(self.renderEvent, self.renderArgs)

    def OnMouseLeftButtonUp(self):
        if self.onMouseLeftButtonUpEvent:
            self.onMouseLeftButtonUpEvent()

    if app.ENABLE_MOUSEWHEEL_EVENT:
        def SetMouseWheelEvent(self, event):
            self.onMouseWheelEvent = event

        def OnMouseWheel(self, delta):
            # print("OnMouseWheel delta %d" % delta)
            if self.onMouseWheelEvent:
                return self.onMouseWheelEvent(delta)
            return False


class ListBoxEx(Window):
 
ui.py:
Genişlet Daralt Kopyala
    def IsIn(self):
        return wndMgr.IsIn(self.hWnd)

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def IsInPosition(self):
            xMouse, yMouse = wndMgr.GetMousePosition()
            x, y = self.GetGlobalPosition()
            return xMouse >= x and xMouse < x + self.GetWidth() and yMouse >= y and yMouse < y + self.GetHeight()

        def SetClickEvent(self, event):
            self.clickEvent = __mem_func__(event)

        def OnMouseLeftButtonDown(self):
            if self.clickEvent:
                self.clickEvent()

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonDoubleClickEvent(self, event):
            self.mouseLeftButtonDoubleClickEvent = event

        def OnMouseLeftButtonDoubleClick(self):
            if self.mouseLeftButtonDoubleClickEvent:
                self.mouseLeftButtonDoubleClickEvent()

        def SetMouseRightButtonDownEvent(self, event, *args):
            self.mouseRightButtonDownEvent = event
            self.mouseRightButtonDownArgs = args

        def OnMouseRightButtonDown(self):
            if self.mouseRightButtonDownEvent:
                apply(self.mouseRightButtonDownEvent, self.mouseRightButtonDownArgs)

        def SetMoveWindowEvent(self, event):
            self.moveWindowEvent = event

        def OnMoveWindow(self, x, y):
            if self.moveWindowEvent:
                self.moveWindowEvent(x, y)

        def SAFE_SetOverInEvent(self, func, *args):
            self.overInEvent = __mem_func__(func)
            self.overInArgs = args

        def SetOverInEvent(self, func, *args):
            self.overInEvent = func
            self.overInArgs = args

        def SAFE_SetOverOutEvent(self, func, *args):
            self.overOutEvent = __mem_func__(func)
            self.overOutArgs = args

        def SetOverOutEvent(self, func, *args):
            self.overOutEvent = func
            self.overOutArgs = args

        def OnMouseOverIn(self):
            if self.overInEvent:
                apply(self.overInEvent, self.overInArgs)

        def OnMouseOverOut(self):
            if self.overOutEvent:
                apply(self.overOutEvent, self.overOutArgs)

        def SAFE_SetRenderEvent(self, event, *args):
            self.renderEvent = __mem_func__(event)
            self.renderArgs = args

        def ClearRenderEvent(self):
            self.renderEvent = None
            self.renderArgs = None

        def OnRender(self):
            if self.renderEvent:
                apply(self.renderEvent, self.renderArgs)

    def OnMouseLeftButtonUp(self):
        if self.onMouseLeftButtonUpEvent:
            self.onMouseLeftButtonUpEvent()

    if app.ENABLE_MOUSEWHEEL_EVENT:
        def SetMouseWheelEvent(self, event):
            self.onMouseWheelEvent = event

        def OnMouseWheel(self, delta):
            # print("OnMouseWheel delta %d" % delta)
            if self.onMouseWheelEvent:
                return self.onMouseWheelEvent(delta)
            return False


class ListBoxEx(Window):
Ham dosyalarını ve eklediğin dosyalarını ayrı ayrı gönderirmisin hepsini kontrol ediyim.
 
Merhaba,
Dosyalarına baktım. Uiminimap eklememişsin. Ancak elimdeki başka bir filesle karşılaştırdım. Onun hata vermesinin sebebi sanırım uiminimapta bulunan aşağıdaki kodda,

Kod:
Genişlet Daralt Kopyala
        if app.ENABLE_MINIMAP_TELEPORT:
            self.board.SetOnMouseLeftButtonUpEvent(ui.__mem_func__(self.OnMouseLeftButtonUpEvent))

sendede o sistem ekli minimapten ışınlanma olayı ve o defe bağlamışlar aslında else de görmesi lazımdı ama görmemiş. oradaki kodu aşağıdaki gibi düzelt dene bakalım düzelmesi lazım.

ui.py:
Genişlet Daralt Kopyala
## Arat

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

## Değiştir.

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args

    def SetOnMouseLeftButtonUpEvent(self, event):
        self.onMouseLeftButtonUpEvent = event

Not: Böyle yaptıktan sonra oyun açılır ve girersen hem mob targeti hemde minimap ışınlanmayı dikkatlice kontrol et. Başka bir şey göremedim açıkcası eklemeler doğruydu.
 
Merhaba,
Dosyalarına baktım. Uiminimap eklememişsin. Ancak elimdeki başka bir filesle karşılaştırdım. Onun hata vermesinin sebebi sanırım uiminimapta bulunan aşağıdaki kodda,

Kod:
Genişlet Daralt Kopyala
        if app.ENABLE_MINIMAP_TELEPORT:
            self.board.SetOnMouseLeftButtonUpEvent(ui.__mem_func__(self.OnMouseLeftButtonUpEvent))

sendede o sistem ekli minimapten ışınlanma olayı ve o defe bağlamışlar aslında else de görmesi lazımdı ama görmemiş. oradaki kodu aşağıdaki gibi düzelt dene bakalım düzelmesi lazım.

ui.py:
Genişlet Daralt Kopyala
## Arat

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args
    else:
        def SetOnMouseLeftButtonUpEvent(self, event):
            self.onMouseLeftButtonUpEvent = event

## Değiştir.

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def SetMouseLeftButtonUpEvent(self, event, *args):
            self.mouseLeftButtonUpEvent = event
            self.mouseLeftButtonUpArgs = args

    def SetOnMouseLeftButtonUpEvent(self, event):
        self.onMouseLeftButtonUpEvent = event

Not: Böyle yaptıktan sonra oyun açılır ve girersen hem mob targeti hemde minimap ışınlanmayı dikkatlice kontrol et. Başka bir şey göremedim açıkcası eklemeler doğruydu.
O hata çözüldü şöyle bir syserr verdi.

syserr:
Genişlet Daralt Kopyala
1102 23:31:31027 :: Traceback (most recent call last):

1102 23:31:31027 ::   File "networkModule.py", line 306, in SetGamePhase

1102 23:31:31027 ::   File "game.py", line 93, in __init__

1102 23:31:31028 ::   File "uiTarget.py", line 536, in __init__

1102 23:31:31028 :: AttributeError
1102 23:31:31028 :: :
1102 23:31:31028 :: 'TargetBoard' object has no attribute 'OnPressedInfoButton'
1102 23:31:31028 ::

Kodun geçtiği satırlar.
ui.py:
Genişlet Daralt Kopyala
    def __init__(self):
        ui.ThinBoard.__init__(self)

        name = ui.TextLine()
        name.SetParent(self)
        name.SetDefaultFontName()
        name.SetOutline()
        name.Show()

        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            infoButton = ui.Button()
            infoButton.SetParent(self)
            infoButton.SetUpVisual("d:/ymir work/ui/game/mark/question_mark_1.tga")
            infoButton.SetOverVisual("d:/ymir work/ui/game/mark/question_mark_2.tga")
            infoButton.SetDownVisual("d:/ymir work/ui/game/mark/question_mark_3.tga")
            infoButton.SetEvent(ui.__mem_func__(self.OnPressedInfoButton))
            infoButton.Hide()

            infoBoard = self.InfoBoard()
            infoBoard.Hide()
            infoButton.showWnd = infoBoard

        hpGauge = ui.Gauge()
        hpGauge.SetParent(self)
        hpGauge.MakeGauge(130, "red")
        hpGauge.Hide()

Oyun şu şekilde kalıyor
Screenshot_1.webp
 
O hata çözüldü şöyle bir syserr verdi.

syserr:
Genişlet Daralt Kopyala
1102 23:31:31027 :: Traceback (most recent call last):

1102 23:31:31027 ::   File "networkModule.py", line 306, in SetGamePhase

1102 23:31:31027 ::   File "game.py", line 93, in __init__

1102 23:31:31028 ::   File "uiTarget.py", line 536, in __init__

1102 23:31:31028 :: AttributeError
1102 23:31:31028 :: :
1102 23:31:31028 :: 'TargetBoard' object has no attribute 'OnPressedInfoButton'
1102 23:31:31028 ::

Kodun geçtiği satırlar.
ui.py:
Genişlet Daralt Kopyala
    def __init__(self):
        ui.ThinBoard.__init__(self)

        name = ui.TextLine()
        name.SetParent(self)
        name.SetDefaultFontName()
        name.SetOutline()
        name.Show()

        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            infoButton = ui.Button()
            infoButton.SetParent(self)
            infoButton.SetUpVisual("d:/ymir work/ui/game/mark/question_mark_1.tga")
            infoButton.SetOverVisual("d:/ymir work/ui/game/mark/question_mark_2.tga")
            infoButton.SetDownVisual("d:/ymir work/ui/game/mark/question_mark_3.tga")
            infoButton.SetEvent(ui.__mem_func__(self.OnPressedInfoButton))
            infoButton.Hide()

            infoBoard = self.InfoBoard()
            infoBoard.Hide()
            infoButton.showWnd = infoBoard

        hpGauge = ui.Gauge()
        hpGauge.SetParent(self)
        hpGauge.MakeGauge(130, "red")
        hpGauge.Hide()

Oyun şu şekilde kalıyor
19814 eklentisini görüntüle
Kod:
Genişlet Daralt Kopyala
#####################/*/-*/-*/*-/-*/-*/-//-/ 「Lyrion 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################

## Aratılır

    def Destroy(self):
        self.eventWhisper = None
        self.closeButton = None
        self.showingButtonList = None
        self.buttonDict = None
        self.name = None
        self.hpGauge = None
        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            self.infoButton = None
        self.__Initialize()

## Altına Eklenir.

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def RefreshMonsterInfoBoard(self):
            if not self.infoButton.showWnd.IsShow():
                return

            self.infoButton.showWnd.Refresh()

        def OnPressedInfoButton(self):
            net.SendTargetInfoLoad(player.GetTargetVID())
            if self.infoButton.showWnd.IsShow():
                self.infoButton.showWnd.Close()
            elif self.vnum != 0:
                self.infoButton.showWnd.Open(self, self.vnum)

#####################/*/-*/-*/*-/-*/-*/-//-/ 「Lyrion 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################
 
Uitarget.py eklermisin konuya
Kod:
Genişlet Daralt Kopyala
#####################/*/-*/-*/*-/-*/-*/-//-/ 「Lyrion 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################

## Aratılır

    def Destroy(self):
        self.eventWhisper = None
        self.closeButton = None
        self.showingButtonList = None
        self.buttonDict = None
        self.name = None
        self.hpGauge = None
        if app.ENABLE_TARGET_INFORMATION_SYSTEM:
            self.infoButton = None
        self.__Initialize()

## Altına Eklenir.

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        def RefreshMonsterInfoBoard(self):
            if not self.infoButton.showWnd.IsShow():
                return

            self.infoButton.showWnd.Refresh()

        def OnPressedInfoButton(self):
            net.SendTargetInfoLoad(player.GetTargetVID())
            if self.infoButton.showWnd.IsShow():
                self.infoButton.showWnd.Close()
            elif self.vnum != 0:
                self.infoButton.showWnd.Open(self, self.vnum)

#####################/*/-*/-*/*-/-*/-*/-//-/ 「Lyrion 」YunusED || Metin2House /*/-*/-*/*-/-*/-*/-//-/#####################

Kafayı yiyeceğim şimdi. Bu sistem bu kadar zor olamaz :)

uitarget.py:
Genişlet Daralt Kopyala
1103 23:24:31450 :: Traceback (most recent call last):

1103 23:24:31450 ::   File "networkModule.py", line 306, in SetGamePhase

1103 23:24:31450 ::   File "game.py", line 93, in __init__

1103 23:24:31450 ::   File "uiTarget.py", line 554, in __init__

1103 23:24:31450 ::   File "uiTarget.py", line 139, in __init__

1103 23:24:31451 :: AttributeError
1103 23:24:31451 :: :
1103 23:24:31451 :: 'InfoBoard' object has no attribute 'HideCorners'
1103 23:24:31451 ::
 

Dosya Eklentileri

Kafayı yiyeceğim şimdi. Bu sistem bu kadar zor olamaz :)

uitarget.py:
Genişlet Daralt Kopyala
1103 23:24:31450 :: Traceback (most recent call last):

1103 23:24:31450 ::   File "networkModule.py", line 306, in SetGamePhase

1103 23:24:31450 ::   File "game.py", line 93, in __init__

1103 23:24:31450 ::   File "uiTarget.py", line 554, in __init__

1103 23:24:31450 ::   File "uiTarget.py", line 139, in __init__

1103 23:24:31451 :: AttributeError
1103 23:24:31451 :: :
1103 23:24:31451 :: 'InfoBoard' object has no attribute 'HideCorners'
1103 23:24:31451 ::
Python:
Genişlet Daralt Kopyala
#ui.py arat

class ThinBoard(Window):

#altında bul

    def SetSize(self, width, height):

        width = max(self.CORNER_WIDTH*2, width)
        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)
        
#altına ekle

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        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())
 
Python:
Genişlet Daralt Kopyala
#ui.py arat

class ThinBoard(Window):

#altında bul

    def SetSize(self, width, height):

        width = max(self.CORNER_WIDTH*2, width)
        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)
       
#altına ekle

    if app.ENABLE_TARGET_INFORMATION_SYSTEM:
        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())

Oyun açıldı.
İnfo butonu görünmüyor şöyle bir syserr veriyor.

syserr:
Genişlet Daralt Kopyala
1103 23:47:28788 :: Traceback (most recent call last):

1103 23:47:28788 ::   File "ui.py", line 454, in OnMouseLeftButtonDown

1103 23:47:28788 :: AttributeError
1103 23:47:28788 :: :
1103 23:47:28788 :: 'AtlasWindow' object has no attribute 'clickEvent'
1103 23:47:28788 ::

1103 23:49:49007 ::
system.py(line:267) RunMainScript
system.py(line:228) execfile
prototype.py(line:59) <module>
prototype.py(line:53) RunApp
ui.py(line:94) _decorator
networkModule.py(line:139) Destroy
game.py(line:289) Close
uiTarget.py(line:674) Destroy

Run - <type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'showWnd'

1103 23:49:01384 :: ============================================================================================================
1103 23:49:01384 :: Abort!!!!

Oyunu kapattığımda çıkan uyarı.
Screenshot_3.webp
 

Muhtemelen şu element gösterme şeyi ortalığı çok karıştırıyorda.
Şöyle bir syserr yazdı. Ayrıca info ikonu görünmüyor yine.

syserr:
Genişlet Daralt Kopyala
1103 23:54:26324 :: Traceback (most recent call last):

1103 23:54:26324 ::   File "ui.py", line 454, in OnMouseLeftButtonDown

1103 23:54:26324 :: AttributeError
1103 23:54:26324 :: :
1103 23:54:26324 :: 'TargetBoard' object has no attribute 'clickEvent'
1103 23:54:26324 ::

1103 23:54:26687 :: Traceback (most recent call last):

1103 23:54:26687 ::   File "ui.py", line 454, in OnMouseLeftButtonDown

1103 23:54:26687 :: AttributeError
1103 23:54:26687 :: :
1103 23:54:26687 :: 'TargetBoard' object has no attribute 'clickEvent'
1103 23:54:26687 ::

1103 23:54:27018 :: Traceback (most recent call last):

1103 23:54:27018 ::   File "ui.py", line 454, in OnMouseLeftButtonDown

1103 23:54:27019 :: AttributeError
1103 23:54:27019 :: :
1103 23:54:27019 :: 'TargetBoard' object has no attribute 'clickEvent'
1103 23:54:27019 ::

1103 23:54:27331 :: Traceback (most recent call last):

1103 23:54:27331 ::   File "ui.py", line 454, in OnMouseLeftButtonDown

1103 23:54:27332 :: AttributeError
1103 23:54:27332 :: :
1103 23:54:27332 :: 'TargetBoard' object has no attribute 'clickEvent'
1103 23:54:27332 ::

1103 23:54:27529 :: Traceback (most recent call last):

1103 23:54:27529 ::   File "ui.py", line 454, in OnMouseLeftButtonDown

1103 23:54:27530 :: AttributeError
1103 23:54:27530 :: :
1103 23:54:27530 :: 'TargetBoard' object has no attribute 'clickEvent'
1103 23:54:27530 ::

1103 23:54:33664 ::
system.py(line:267) RunMainScript
system.py(line:228) execfile
prototype.py(line:59) <module>
prototype.py(line:53) RunApp
ui.py(line:94) _decorator
networkModule.py(line:139) Destroy
game.py(line:289) Close
uiTarget.py(line:670) Destroy

Run - <type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'showWnd'

1103 23:55:48298 :: ============================================================================================================
1103 23:55:48299 :: Abort!!!!
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst