Yardım PlayTime Affectlerde Gösterme Hata

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

LethalStrikeR

Yardımsever Üye
Yardımsever Üye
MT Üye
Mesaj
749
Çözümler
41
Beğeni
182
Puan
609
Ticaret Puanı
0
Merhaba;

Affectlerde playtime gösterme sistemini ekledim fakat böyle syserr basıyor;
Kod:
Genişlet Daralt Kopyala
0629 05:14:09540 :: Unknown Server Command ClientLogonStart 0 | ClientLogonStart
0629 05:14:19587 :: Exception
0629 05:14:19587 :: AttributeError
0629 05:14:19587 :: :
0629 05:14:19587 :: "'AutoPotionImage' object has no attribute 'imageLoaded'"
0629 05:14:19587 ::  in
0629 05:14:19587 :: <bound method AutoPotionImage.__del__ of <uiAffectShower.AutoPotionImage object at 0x06474330>>
0629 05:14:19587 ::  ignored

0629 05:14:19587 :: Exception
0629 05:14:19587 :: AttributeError
0629 05:14:19587 :: :
0629 05:14:19587 :: "'AutoPotionImage' object has no attribute 'imageLoaded'"
0629 05:14:19587 ::  in
0629 05:14:19587 :: <bound method AutoPotionImage.__del__ of <uiAffectShower.AutoPotionImage object at 0x06474E30>>
0629 05:14:19587 ::  ignored

0629 05:14:19587 :: Exception
0629 05:14:19587 :: AttributeError
0629 05:14:19587 :: :
0629 05:14:19587 :: "'ImageBox' object has no attribute 'imageLoaded'"
0629 05:14:19587 ::  in
0629 05:14:19587 :: <bound method ImageBox.__del__ of <ui.ImageBox object at 0x064748B0>>
0629 05:14:19587 ::  ignored

İlk bir kere girdim düzgündü gir çık yaptım hata vermeye başladı ve icon gözükmemeye başladı.

game.py eklediğim kodlar bu;

Python:
Genişlet Daralt Kopyala
 Bul:
def BINARY_OnQuestConfirm(self, msg, timeout, pid)

Üstüne ekle:
    # LOGON
    def BINARY_InitPlayTime(self, play_time):
        if self.affectShower:
            self.affectShower.SetPlayTime(play_time)

    def BINARY_UpdatePlayTime(self, play_time):
        if self.affectShower:
            self.affectShower.OnUpdatePlayTime(play_time)
    # END LOGON
    

    
Bul:
            "MyShopPriceList"        : self.__PrivateShop_PriceList,

Üstüne ekle:
            # LOGON
            "ClientLogonStart"        : self.BINARY_InitPlayTime,
            "ClientLogonUpdate"        : self.BINARY_UpdatePlayTime,
            # END LOGON
 
ui.py içinde ImageBox içinde imageLoaded diye bir tanımlama mı mevcut ?

Yoksa olmadığı için hata veriyor olmalıdır. Bir sistem eklemesi yapınca muhtemelen ImageBox class'ını komple değiştirmiş olabilirsin, tahminimce.
 
Tanımlama mevcut ama bu hatayı basıyor
Kod:
Genişlet Daralt Kopyala
0629 14:17:16081 :: Unknown Server Command ClientLogonStart 0 | ClientLogonStart
0629 14:18:15657 :: mouseModule:386: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0629 14:18:15657 :: Traceback (most recent call last):

0629 14:18:15657 ::   File "mouseModule.py", line 386, in Update

0629 14:18:15657 :: RuntimeError
0629 14:18:15657 :: : 
0629 14:18:15657 :: Failed to load image (filename: d:/ymir work/ui/game/playtime/B-1.dds)
0629 14:18:15657 :: 

0629 14:19:15651 :: Traceback (most recent call last):

0629 14:19:15651 ::   File "mouseModule.py", line 386, in Update

0629 14:19:15651 :: RuntimeError
0629 14:19:15651 :: : 
0629 14:19:15651 :: Failed to load image (filename: d:/ymir work/ui/game/playtime/B-1.dds)

Char.pp de komutlar mevcut.
 
Tanımlama mevcut ama bu hatayı basıyor
Kod:
Genişlet Daralt Kopyala
0629 14:17:16081 :: Unknown Server Command ClientLogonStart 0 | ClientLogonStart

Char.pp de komutlar mevcut.
game.py:
Genişlet Daralt Kopyala
# Arat
            "PlayMusic"                : self.__PlayMusic,
            # END_OF_WEDDING

# Altına Ekle
            # LOGON
            "ClientLogonStart"        : self.BINARY_InitPlayTime,
            "ClientLogonUpdate"        : self.BINARY_UpdatePlayTime,
            # END LOGON
 
game.py:
Genişlet Daralt Kopyala
# Arat
            "PlayMusic"                : self.__PlayMusic,
            # END_OF_WEDDING

# Altına Ekle
            # LOGON
            "ClientLogonStart"        : self.BINARY_InitPlayTime,
            "ClientLogonUpdate"        : self.BINARY_UpdatePlayTime,
            # END LOGON
Orası böyle zaten.
Python:
Genişlet Daralt Kopyala
            # WEDDING
            "lover_login"            : self.__LoginLover,
            "lover_logout"            : self.__LogoutLover,
            "lover_near"            : self.__LoverNear,
            "lover_far"                : self.__LoverFar,
            "lover_divorce"            : self.__LoverDivorce,
            "PlayMusic"                : self.__PlayMusic,
            # END_OF_WEDDING

            # LOGON
            "ClientLogonStart"        : self.BINARY_InitPlayTime,
            "ClientLogonUpdate"        : self.BINARY_UpdatePlayTime,
            # END LOGON
 
Tanımlama mevcut ama bu hatayı basıyor
Kod:
Genişlet Daralt Kopyala
0629 14:17:16081 :: Unknown Server Command ClientLogonStart 0 | ClientLogonStart
0629 14:18:15657 :: mouseModule:386: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0629 14:18:15657 :: Traceback (most recent call last):

0629 14:18:15657 ::   File "mouseModule.py", line 386, in Update

0629 14:18:15657 :: RuntimeError
0629 14:18:15657 :: :
0629 14:18:15657 :: Failed to load image (filename: d:/ymir work/ui/game/playtime/B-1.dds)
0629 14:18:15657 ::

0629 14:19:15651 :: Traceback (most recent call last):

0629 14:19:15651 ::   File "mouseModule.py", line 386, in Update

0629 14:19:15651 :: RuntimeError
0629 14:19:15651 :: :
0629 14:19:15651 :: Failed to load image (filename: d:/ymir work/ui/game/playtime/B-1.dds)

Char.pp de komutlar mevcut.
büyük küçük harf tamamen uyuyor mu playtime/B-1.dds bi kontrol et hocam birde b-1 yerine b1.dds yapsan daha iyi olur bence
 
Tanımlama mevcut ama bu hatayı basıyor
Kod:
Genişlet Daralt Kopyala
0629 14:17:16081 :: Unknown Server Command ClientLogonStart 0 | ClientLogonStart
0629 14:18:15657 :: mouseModule:386: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0629 14:18:15657 :: Traceback (most recent call last):

0629 14:18:15657 ::   File "mouseModule.py", line 386, in Update

0629 14:18:15657 :: RuntimeError
0629 14:18:15657 :: :
0629 14:18:15657 :: Failed to load image (filename: d:/ymir work/ui/game/playtime/B-1.dds)
0629 14:18:15657 ::

0629 14:19:15651 :: Traceback (most recent call last):

0629 14:19:15651 ::   File "mouseModule.py", line 386, in Update

0629 14:19:15651 :: RuntimeError
0629 14:19:15651 :: :
0629 14:19:15651 :: Failed to load image (filename: d:/ymir work/ui/game/playtime/B-1.dds)

Char.pp de komutlar mevcut.
Server source'da gerekli kodlar yok.
 
Server source'da gerekli kodlar yok.
Bu kod ekliydi.
C++:
Genişlet Daralt Kopyala
DWORD CHARACTER::GetLogonTime(){
    return (get_dword_time() - m_dwLogonTime) / 1000 + 0.5; //now - logon_time -> convert ms to sec > convert float to int
}

void CHARACTER::CheckLogonTime(int time){
    if (time / 60 > 180 && !m_iLogonIsRewarded){
        ChatPacket(CHAT_TYPE_INFO, "3 saattir oyunda oldugun icin 10M kazandin"); //You are won 10M for that 3 hours in the game
        PointChange(POINT_GOLD, 10000000, false); //10.000.000
        DBManager::instance().SendMoneyLog(MONEY_LOG_QUEST, 1, 10000000);

        m_iLogonIsRewarded = 1;
    }

    ChatPacket(CHAT_TYPE_COMMAND, "ClientLogonUpdate %d", time / 60);
}

EVENTFUNC(logontime_check_event)
{
    char_event_info* info = dynamic_cast<char_event_info*>(event->info);
    if (info == NULL)
    {
        sys_err("logontime_check_event> <Factor> Null pointer");
        return 0;
    }

    LPCHARACTER    ch = info->ch;
    if (ch == NULL) { // <Factor>
        return 0;
    }

    ch->CheckLogonTime(ch->GetLogonTime());

    return PASSES_PER_SEC(60); //1min
}

void CHARACTER::InitCharLogonEvent(){
    if (m_pkLogonEvent)
        return;

    if (m_iLogonIsStarted != 1) {
        ChatPacket(CHAT_TYPE_COMMAND, "ClientLogonStart 0");
        m_iLogonIsStarted = 1;
    }

    char_event_info* info = AllocEventInfo<char_event_info>();

    info->ch = this;

    m_pkLogonEvent = event_create(logontime_check_event, info, PASSES_PER_SEC(60));
}
 
Bu kod ekliydi.
C++:
Genişlet Daralt Kopyala
DWORD CHARACTER::GetLogonTime(){
    return (get_dword_time() - m_dwLogonTime) / 1000 + 0.5; //now - logon_time -> convert ms to sec > convert float to int
}

void CHARACTER::CheckLogonTime(int time){
    if (time / 60 > 180 && !m_iLogonIsRewarded){
        ChatPacket(CHAT_TYPE_INFO, "3 saattir oyunda oldugun icin 10M kazandin"); //You are won 10M for that 3 hours in the game
        PointChange(POINT_GOLD, 10000000, false); //10.000.000
        DBManager::instance().SendMoneyLog(MONEY_LOG_QUEST, 1, 10000000);

        m_iLogonIsRewarded = 1;
    }

    ChatPacket(CHAT_TYPE_COMMAND, "ClientLogonUpdate %d", time / 60);
}

EVENTFUNC(logontime_check_event)
{
    char_event_info* info = dynamic_cast<char_event_info*>(event->info);
    if (info == NULL)
    {
        sys_err("logontime_check_event> <Factor> Null pointer");
        return 0;
    }

    LPCHARACTER    ch = info->ch;
    if (ch == NULL) { // <Factor>
        return 0;
    }

    ch->CheckLogonTime(ch->GetLogonTime());

    return PASSES_PER_SEC(60); //1min
}

void CHARACTER::InitCharLogonEvent(){
    if (m_pkLogonEvent)
        return;

    if (m_iLogonIsStarted != 1) {
        ChatPacket(CHAT_TYPE_COMMAND, "ClientLogonStart 0");
        m_iLogonIsStarted = 1;
    }

    char_event_info* info = AllocEventInfo<char_event_info>();

    info->ch = this;

    m_pkLogonEvent = event_create(logontime_check_event, info, PASSES_PER_SEC(60));
}
Bu değil cmd_xx.cpp eklemeleri eksik
 
Geri
Üst