Yardım zindan takip sistemi

Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

mnyk2070

MT Üye
MT Üye
Editör
Mesaj
394
Çözümler
11
Beğeni
131
Puan
499
Ticaret Puanı
0
filese zindan takip sistemi ekledim fakat bazı sorunlar var örneğin pack syserr de şöyle bir sorun var
Kod:
0524 14:28:22339 :: Traceback (most recent call last):

0524 14:28:22339 ::   File "ui.py", line 1705, in CallEvent

0524 14:28:22340 ::   File "uiDungeonInfo.py", line 287, in TeleportDungeon

0524 14:28:22340 :: AttributeError
0524 14:28:22349 :: :
0524 14:28:22349 :: 'QuestionDialogWithTimeLimitdungeon' object has no attribute 'SetCancelOnTimeOver'
0524 14:28:22349 ::

0524 14:28:39565 :: Traceback (most recent call last):

0524 14:28:39565 ::   File "ui.py", line 1705, in CallEvent

0524 14:28:39565 ::   File "uiDungeonInfo.py", line 287, in TeleportDungeon

0524 14:28:39565 :: AttributeError
0524 14:28:39565 :: :
0524 14:28:39565 :: 'QuestionDialogWithTimeLimitdungeon' object has no attribute 'SetCancelOnTimeOver'
0524 14:28:39565 ::

mesela zindanı bitirenler listesini açarken arka planda boş pencere açılıyor şöyle örnekler verebilirim
 

Dosya Eklentileri

  • Adsız.png
    Adsız.png
    699,2 KB · Gösterim: 275
  • asd.png
    asd.png
    630,1 KB · Gösterim: 200
QuestionDialogWithTimeLimitdungeon içerisinde SetCancelOnTimeOver olmadıgını söylüyor kontrol edin eger yok ise eklediginiz dosyara bi göz atın yanlış yere eklemiş yada eksik eklemiş olabilirsin
 
File "uiDungeonInfo.py", line 287, in TeleportDungeon
 
Python:
    def TeleportDungeon(self):
        self.questionDialog = uiCommon.QuestionDialogWithTimeLimitdungeon()
        self.questionDialog.Open("%s zindanına ışınlanmak istiyor musun?" % str(constInfo2.dungeonInfo[self.dungeonIndex]['map']), 5)
        self.questionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
        self.questionDialog.SetCancelText(localeInfo.UI_DENY)
        self.questionDialog.SetAcceptEvent(lambda arg = True: self.AnswerTeleport(arg))
        self.questionDialog.SetCancelEvent(lambda arg = False: self.AnswerTeleport(arg))
        self.questionDialog.SetCancelOnTimeOver()  287.satır bu
        self.questionDialog.SetTop()
 
uicommon içinden QuestionDialogWithTimeLimitdungeon arat SetCancelOnTimeOver bulamıyor
 
Python:
class QuestionDialogWithTimeLimitdungeon(QuestionDialog2):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.__CreateDialog()
        self.endTime = 0

    def __del__(self):
        QuestionDialog2.__del__(self)

    def __CreateDialog(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog2.py")

        self.board = self.GetChild("board")
        self.textLine1 = self.GetChild("message1")
        self.textLine2 = self.GetChild("message2")
        self.acceptButton = self.GetChild("accept")
        self.cancelButton = self.GetChild("cancel")

    def Open(self, msg, timeout):
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

        self.SetText1(msg)
        self.endTime = app.GetTime() + timeout

    def OnUpdate(self):
        leftTime = max(0, self.endTime - app.GetTime())
        self.SetText2(localeInfo.UI_LEFT_TIME % (leftTime))
 
burada def SetCancelOnTimeOver olması gerekiyor sanırım ve yok birde bunları yapacak kişi ben degilim sadece kodları atmak yerine hata bulmak için çabalayabilirsin
 
Sistemin paylaşıldıgı yerdeki yorumları okuyun aynı problemi yaşayanlar için çözümü paylaşılmış olabilir
 
2 kere okudum da bu hatayı alanların sorunu çözüme kavuşmamış,olsa bile yazmamışlar foruma teşekkür ederim ilgin için
 
şöyle olması gerekirken ışınlanma tuşu çalışmıyor
Python:
class QuestionDialogWithTimeLimitdungeon(QuestionDialog2):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.__CreateDialog()
        self.endTime = 0

    def __del__(self):
        QuestionDialog2.__del__(self)

    def __CreateDialog(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog2.py")

        self.board = self.GetChild("board")
        self.textLine1 = self.GetChild("message1")
        self.textLine2 = self.GetChild("message2")
        self.acceptButton = self.GetChild("accept")
        self.cancelButton = self.GetChild("cancel")

    def Open(self, msg, timeout):
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

        self.SetText1(msg)
        self.endTime = app.GetTime() + timeout

    def OnUpdate(self):
        leftTime = max(0, self.endTime - app.GetTime())
        self.SetText2(localeInfo.UI_LEFT_TIME % (leftTime))

        board = self.GetChild("board")
        self.acceptButton = getObject("AcceptButton")
        self.cancelButton = getObject("CancelButton")
        self.inputValue = getObject("InputValue")
        #self.inputValue.SetNumberMode()
        self.inputValue.OnIMEUpdate = ui.__mem_func__(self.__OnValueUpdate)
        self.moneyText = getObject("MoneyValue")

    def Open(self):
        self.inputValue.SetText("")
        self.inputValue.SetFocus()
        self.__OnValueUpdate()
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

    def Close(self):
        self.ClearDictionary()
        self.board = None
        self.acceptButton = None
        self.cancelButton = None
        self.inputValue = None
        self.Hide()

    def SetTitle(self, name):
        self.board.SetTitleName(name)

    def SetFocus(self):
        self.inputValue.SetFocus()

    def SetMaxLength(self, length):
        self.inputValue.SetMax(length)
        self.inputValue.SetUserMax(length)

    def SetMoneyHeaderText(self, text):
        self.moneyHeaderText = text

    def SetAcceptEvent(self, event):
        self.acceptButton.SetEvent(event)
        self.inputValue.OnIMEReturn = event

    def SetCancelEvent(self, event):
        self.board.SetCloseEvent(event)
        self.cancelButton.SetEvent(event)
        self.inputValue.OnPressEscapeKey = event

    def SetValue(self, value):
        value=str(value)
        self.inputValue.SetText(value)
        self.__OnValueUpdate()
        ime.SetCursorPosition(len(value))      


    def GetText(self):
        return self.inputValue.GetText()

    def __OnValueUpdate(self):
        ui.EditLine.OnIMEUpdate(self.inputValue)

        text = self.inputValue.GetText()
        for i in xrange(len(text)):
            if not text[i].isdigit():
                text=text[0:i]+text[i+1:]
                self.inputValue.SetText(text)
        self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(text))

böyleyken çalışıyor ışınlanma tuşu
Python:
class QuestionDialogWithTimeLimitdungeon(QuestionDialog2):

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.__CreateDialog()
        self.endTime = 0

    def __del__(self):
        QuestionDialog2.__del__(self)

    def __CreateDialog(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog2.py")

        self.board = self.GetChild("board")
        self.textLine1 = self.GetChild("message1")
        self.textLine2 = self.GetChild("message2")
        self.acceptButton = self.GetChild("accept")
        self.cancelButton = self.GetChild("cancel")

    def Open(self, msg, timeout):
        self.SetCenterPosition()
        self.SetTop()
        self.Show()

        self.SetText1(msg)
        self.endTime = app.GetTime() + timeout

    def OnUpdate(self):
        leftTime = max(0, self.endTime - app.GetTime())
        self.SetText2(localeInfo.UI_LEFT_TIME % (leftTime))
 
Geri
Üst