Yardım Global Rank sistem syserr

  • Konuyu açan Konuyu açan MCB
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 0
  • Gösterim Gösterim 160
Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

MCB

CGames
Premium Üye
Yardımsever Üye
Usta Üye
Mesaj
507
Çözümler
34
Beğeni
361
Puan
930
Ticaret Puanı
1
Kod:
Genişlet Daralt Kopyala
0223 16:24:12653 :: Traceback (most recent call last):

0223 16:24:12653 ::   File "game.py", line 1277, in OnKeyDown

0223 16:24:12654 ::   File "game.py", line 348, in <lambda>

0223 16:24:12654 ::   File "game.py", line 2502, in OpenRanking

0223 16:24:12654 ::   File "uirank.py", line 51, in Open

0223 16:24:12654 ::   File "uirank.py", line 73, in LoadInfo

0223 16:24:12654 ::   File "uirank.py", line 116, in __init__

0223 16:24:12654 :: TypeError
0223 16:24:12654 :: :
0223 16:24:12654 :: int() argument must be a string or a number, not 'NoneType'
0223 16:24:12654 ::

uirank.py:
Genişlet Daralt Kopyala
        list = [ ["Level","level"],["Destroyed Stone","stone"],["Killed Monster","monster"],["Killed Boss","boss"],["Completed Dungeon","dungeon"],["Playtime","playtime"],["Gold","gold"],["Gaya","gaya"],["Caught Fishes","fish"],["Opened Chest","chest"]]
        #chat.AppendChat(chat.CHAT_TYPE_INFO, "index: %d"%index)
        for j in xrange(10):
            if constInfo.GetFlag("rank_%s_value_%d"%(list[index][1],j)) == 0:
                continue
            resultItem = ItemNEW(self,j+1,constInfo.GetFlag("rank_%s_name_%d"%(list[index][1],j)),constInfo.GetFlag("rank_%s_empire_%d"%(list[index][1],j)),constInfo.GetFlag("rank_%s_value_%d"%(list[index][1],j)))
            #chat.AppendChat(chat.CHAT_TYPE_INFO, "name: %s %s %d %d"%(list[index][1],constInfo.GetFlag("rank_%s_name_%d"%(list[index][1],j)),constInfo.GetFlag("rank_%s_empire_%d"%(list[index][1],j)),constInfo.GetFlag("rank_%s_value_%d"%(list[index][1],j))))
            resultItem.Show()
            self.ListBoxNew.AppendItem(resultItem)

        for j in xrange(len(self.ListBox.itemList)):
            if index == j:
                self.ListBox.itemList[j].Image.SetUpVisual("ranking/btn_%d_1.tga"%j)
                self.ListBox.itemList[j].Image.SetOverVisual("ranking/btn_%d_1.tga"%j)
                self.ListBox.itemList[j].Image.SetDownVisual("ranking/btn_%d_1.tga"%j)
            else:
                self.ListBox.itemList[j].Image.SetUpVisual("ranking/btn_%d_0.tga"%j)
                self.ListBox.itemList[j].Image.SetOverVisual("ranking/btn_%d_0.tga"%j)
                self.ListBox.itemList[j].Image.SetDownVisual("ranking/btn_%d_1.tga"%j)
    
class Item(ui.Window):
    def __init__(self, parent, index,image,name):
        ui.Window.__init__(self)
        self.parent = parent
        self.SetParent(parent)
        self.Index = int(index)
        self.image_type = image
        self.name_type = name
        self.SetSize(500, 38)
        self.InitItem()

    def InitItem(self):
        self.Image = ui.Button()
        self.Image.SetParent(self)
        self.Image.SetUpVisual("ranking/btn_%d_0.tga"%self.Index)
        self.Image.SetOverVisual("ranking/btn_%d_0.tga"%self.Index)
        self.Image.SetDownVisual("ranking/btn_%d_1.tga"%self.Index)
        self.Image.SetEvent(lambda: self.parent.LoadInfo(self.Index))
        self.Image.SetPosition(1, 2)
        self.Image.Show()

class ItemNEW(ui.Window):
    def __init__(self, parent, index,name,empire, value):
        ui.Window.__init__(self)
        self.parent = parent
        self.SetParent(parent)
        self.Index = int(index)
        self.name = str(name)
        self.empire = int(empire) // SYSERRDE GÖSTERİLEN YER
        self.value = int(value)
        self.SetSize(500, 38)
        self.InitItem()

    def InitItem(self):
        color = "|cFFCD853F"
        if self.Index == 1:
            color = "|cffffcc00"
        elif self.Index == 2:
            color = "|cFFB0C4DE"
        elif self.Index == 3:
            color = "|cFF8B4513"
        self.NameText = ui.TextLine()
        self.NameText.SetParent(self)
        self.NameText.SetPosition(65, 3)
        self.NameText.SetText("%s%s" % (color,self.name))
        self.NameText.Show()

        self.EmpireImage = ui.ImageBox()
        self.EmpireImage.SetParent(self)
        self.EmpireImage.LoadImage("d:/ymir work/ui/game/rank/empire_%d.sub"%self.empire)
        self.EmpireImage.SetPosition(175, 2)
        self.EmpireImage.Show()

        self.ValueText = ui.TextLine()
        self.ValueText.SetParent(self)
        self.ValueText.SetPosition(260, 2)
        self.ValueText.SetText("%s%s" % (color,localeInfo.NumberToMoneyStringNEW(self.value)))
        self.ValueText.Show()
 
Geri
Üst