wndMgr.EnableFlash (butonlara flash efekti vermek için) bu sistemi kullanıyorsanız veya eklediyseniz pm attığınızda mektup simgesi yanıp sönmeyecektir.
Bu bir hatadır ve çözümü:
Veya bu hatanın sadece whisper yani fısıltı butonu için çıkacağını varsayarak root/interfacemodule.py dosyasında
def __MakeWhisperButton(self, name): içerisinde
whisperButton.SetUpVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
whisperButton.SetOverVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
whisperButton.SetDownVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
Bu 3 resmi farklı yaparakta kısmen sorunu çözebilirsiniz. Birinci yolu tavsiye ediyorum.
CButton::EnableFlash() Hatası ve PM Butonu Sorunu Çözümü
Metin2 özel sunucularında geliştirme yaparken bazı C++ tabanlı hatalarla karşılaşmak oldukça sık rastlanan durumlardandır. Özellikle kullanıcı arayüzü (UI) üzerinde çalışan sistemlerde, butonlarla ilgili sorunlar doğabilir. Bu yazıda CButton::EnableFlash() fonksiyonunun hata vermesi ve özel mesaj (PM) butonunun çalışmayan versiyonlarında oluşabilecek sorunları ele alacağız.
Hatanın Tanımı
Metin2 istemci (client) tarafında CButton::EnableFlash() fonksiyonu çağrıldığında, bazen aşağıdaki gibi bir hata alınabilir:
Error: CButton::EnableFlash() not found
Bu hata genellikle UIScript veya Python GUI dosyalarında tanımlanan bir buton nesnesi üzerinden flaşlama efekti çalıştırılmak istendiğinde ortaya çıkar. Bu fonksiyon, kullanıcıya dikkat çekici bir animasyonla butonun aktif olduğunu göstermek için kullanılır. Ancak bazı derlemelerde bu fonksiyon eksik kalabilir veya doğru şekilde tanımlanmamış olabilir.
Olası Nedenler
1. Client Source sürümüne bağlı olarak CButton::EnableFlash() fonksiyonu derlenmiş yapıda bulunmayabilir.
2. UIScript dosyasında buton tanımı eksik ya da yanlış yapılandırılmıştır.
3. GameCore ile PyRoot arasındaki entegrasyon eksik olabilir.
Çözüm Adımları
Aşağıdaki adımlar, CButton::EnableFlash() hatasını gidermek için uygulanabilir:
1. Client Kaynağı Kontrolü
Öncelikle client source dosyalarınızda CButton sınıfının EnableFlash metoduna sahip olduğundan emin olun. Eğer bu metod yoksa, aşağıdaki gibi bir implementasyon eklemeniz gerekebilir:
void CButton::EnableFlash(BOOL flag)
{
m_bFlashEnable = flag;
}
2. UIScript Dosyasında Tanımlama
UIScript dosyasında, buton nesnesinin doğru şekilde tanımlandığından emin olun. Örneğin:
{'name': 'pm_button', 'type': 'button', 'text': 'Mesaj Gönder', 'x': 10, 'y': 10}
3. PyRoot ve UI Script Entegrasyonu
Python tarafında buton nesnesine ulaşırken, EnableFlash() fonksiyonunu doğru şekilde çağırdığınızdan emin olun. Örnek:
self.pm_button.EnableFlash(True)
PM Butonunda Ortaya Çıkabilecek Ekstra Hatalar
Bazı Metin2 özel sunucularda, özel mesaj butonu açılmadığında ya da sistemsel olarak devre dışı kaldığında benzer hatalar görülebilir. Bu durumda şu kontroller yapılmalıdır:
- AuthServer ve GameServer bağlantısının sağlandığından emin olun.
- DB Core tarafında mesaj sistemine erişim olup olmadığı kontrol edilmeli.
- Channel ayarlarında PM sistemine izin verildiğinden emin olun.
Sonuç
CButton::EnableFlash() hatası, genellikle küçük kodsal eksikliklerden kaynaklanır. Doğru source edit ve compile işlemleriyle bu sorunlar kolayca çözülebilir. Bu tür hatalarla uğraşırken, Martysama ve diğer Metin2Dev kaynaklarını kullanmanız önerilir. Dilerseniz forumumuza giderek daha fazla teknik destek alabilirsiniz: Metin2Lobby
CButton::EnableFlash() Error and PM Button Issue Solution
While developing Metin2 private servers, encountering certain C++ based errors is quite common. Especially in user interface (UI) related systems, problems may arise with buttons. In this article, we will examine issues where the CButton::EnableFlash() function throws an error and how it affects the non-working private message (PM) button.
Error Description
In the Metin2 client side, when the CButton::EnableFlash() function is called, you might sometimes encounter an error like the following:
Error: CButton::EnableFlash() not found
This error typically occurs when attempting to trigger a flashing effect on a button defined in UIScript or Python GUI files. This function is used to visually indicate that a button is active through an eye-catching animation. However, in some builds, this function may be missing or improperly defined.
Possible Causes
1. Depending on your Client Source version, the CButton::EnableFlash() function may not exist in the compiled build.
2. The button definition in the UIScript file might be incomplete or incorrectly configured.
3. Integration between GameCore and PyRoot may be missing.
Solution Steps
The following steps can resolve the CButton::EnableFlash() error:
1. Check Client Source
First, ensure that the CButton class in your client source files includes the EnableFlash method. If this method does not exist, you might need to add an implementation like the following:
void CButton::EnableFlash(BOOL flag)
{
m_bFlashEnable = flag;
}
2. Define Correctly in UIScript File
Ensure that the button object is properly defined in the UIScript file. For example:
{'name': 'pm_button', 'type': 'button', 'text': 'Send Message', 'x': 10, 'y': 10}
3. PyRoot and UI Script Integration
When accessing the button object from the Python side, make sure to call the EnableFlash() function correctly. Example:
self.pm_button.EnableFlash(True)
Additional Issues in PM Button
In some Metin2 private servers, similar errors may occur if the private message button does not open or becomes systemically disabled. In such cases, the following checks should be performed:
- Ensure the connection between AuthServer and GameServer is established.
- Check whether access to the message system exists in the DB Core side.
- Confirm that PM system is enabled in Channel settings.
Conclusion
CButton::EnableFlash() errors are generally caused by minor code deficiencies. These issues can easily be resolved with correct source edit and compile operations. While dealing with such errors, it is recommended to use resources such as Martysama and other Metin2Dev materials. You can visit our forum for further technical support: Metin2Lobby
Bu bir hatadır ve çözümü:
Kod:
//arat CButton::CButton(PyObject ardından m_isFlash(FALSE) altına ekle ,m_isNormalFlash(FALSE) //arat void CButton::Flash() ve içerisine ekle m_isNormalFlash = TRUE; //arat void CButton::OnRender() ve içerisini komple değiştir. if (!IsShow()) return; if (m_pcurVisual) { if (m_isFlash) { if(m_isNormalFlash) //fix { if (!IsIn()) if (int(timeGetTime() / 500)%2) { return; } } else { if ((int(timeGetTime() / 500) % 2) && !IsIn() && !IsPressed()) { if (!m_overVisual.IsEmpty()) SetCurrentVisual(&m_overVisual); } else { if (IsIn() && !IsPressed()) { if (!m_overVisual.IsEmpty()) SetCurrentVisual(&m_overVisual); } else if (IsPressed()) { if (!m_downVisual.IsEmpty()) SetCurrentVisual(&m_downVisual); } else { if (!m_upVisual.IsEmpty()) SetCurrentVisual(&m_upVisual); } } } } m_pcurVisual->Render(); } PyCallClassMemberFunc(m_poHandler, "OnRender", BuildEmptyTuple());
Kod:
//arat BOOL m_isFlash; ve altına ekle BOOL m_isNormalFlash;
Veya bu hatanın sadece whisper yani fısıltı butonu için çıkacağını varsayarak root/interfacemodule.py dosyasında
def __MakeWhisperButton(self, name): içerisinde
whisperButton.SetUpVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
whisperButton.SetOverVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
whisperButton.SetDownVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
Bu 3 resmi farklı yaparakta kısmen sorunu çözebilirsiniz. Birinci yolu tavsiye ediyorum.
CButton::EnableFlash() Hatası ve PM Butonu Sorunu Çözümü
Metin2 özel sunucularında geliştirme yaparken bazı C++ tabanlı hatalarla karşılaşmak oldukça sık rastlanan durumlardandır. Özellikle kullanıcı arayüzü (UI) üzerinde çalışan sistemlerde, butonlarla ilgili sorunlar doğabilir. Bu yazıda CButton::EnableFlash() fonksiyonunun hata vermesi ve özel mesaj (PM) butonunun çalışmayan versiyonlarında oluşabilecek sorunları ele alacağız.
Hatanın Tanımı
Metin2 istemci (client) tarafında CButton::EnableFlash() fonksiyonu çağrıldığında, bazen aşağıdaki gibi bir hata alınabilir:
Error: CButton::EnableFlash() not found
Bu hata genellikle UIScript veya Python GUI dosyalarında tanımlanan bir buton nesnesi üzerinden flaşlama efekti çalıştırılmak istendiğinde ortaya çıkar. Bu fonksiyon, kullanıcıya dikkat çekici bir animasyonla butonun aktif olduğunu göstermek için kullanılır. Ancak bazı derlemelerde bu fonksiyon eksik kalabilir veya doğru şekilde tanımlanmamış olabilir.
Olası Nedenler
1. Client Source sürümüne bağlı olarak CButton::EnableFlash() fonksiyonu derlenmiş yapıda bulunmayabilir.
2. UIScript dosyasında buton tanımı eksik ya da yanlış yapılandırılmıştır.
3. GameCore ile PyRoot arasındaki entegrasyon eksik olabilir.
Çözüm Adımları
Aşağıdaki adımlar, CButton::EnableFlash() hatasını gidermek için uygulanabilir:
1. Client Kaynağı Kontrolü
Öncelikle client source dosyalarınızda CButton sınıfının EnableFlash metoduna sahip olduğundan emin olun. Eğer bu metod yoksa, aşağıdaki gibi bir implementasyon eklemeniz gerekebilir:
void CButton::EnableFlash(BOOL flag)
{
m_bFlashEnable = flag;
}
2. UIScript Dosyasında Tanımlama
UIScript dosyasında, buton nesnesinin doğru şekilde tanımlandığından emin olun. Örneğin:
{'name': 'pm_button', 'type': 'button', 'text': 'Mesaj Gönder', 'x': 10, 'y': 10}
3. PyRoot ve UI Script Entegrasyonu
Python tarafında buton nesnesine ulaşırken, EnableFlash() fonksiyonunu doğru şekilde çağırdığınızdan emin olun. Örnek:
self.pm_button.EnableFlash(True)
PM Butonunda Ortaya Çıkabilecek Ekstra Hatalar
Bazı Metin2 özel sunucularda, özel mesaj butonu açılmadığında ya da sistemsel olarak devre dışı kaldığında benzer hatalar görülebilir. Bu durumda şu kontroller yapılmalıdır:
- AuthServer ve GameServer bağlantısının sağlandığından emin olun.
- DB Core tarafında mesaj sistemine erişim olup olmadığı kontrol edilmeli.
- Channel ayarlarında PM sistemine izin verildiğinden emin olun.
Sonuç
CButton::EnableFlash() hatası, genellikle küçük kodsal eksikliklerden kaynaklanır. Doğru source edit ve compile işlemleriyle bu sorunlar kolayca çözülebilir. Bu tür hatalarla uğraşırken, Martysama ve diğer Metin2Dev kaynaklarını kullanmanız önerilir. Dilerseniz forumumuza giderek daha fazla teknik destek alabilirsiniz: Metin2Lobby
CButton::EnableFlash() Error and PM Button Issue Solution
While developing Metin2 private servers, encountering certain C++ based errors is quite common. Especially in user interface (UI) related systems, problems may arise with buttons. In this article, we will examine issues where the CButton::EnableFlash() function throws an error and how it affects the non-working private message (PM) button.
Error Description
In the Metin2 client side, when the CButton::EnableFlash() function is called, you might sometimes encounter an error like the following:
Error: CButton::EnableFlash() not found
This error typically occurs when attempting to trigger a flashing effect on a button defined in UIScript or Python GUI files. This function is used to visually indicate that a button is active through an eye-catching animation. However, in some builds, this function may be missing or improperly defined.
Possible Causes
1. Depending on your Client Source version, the CButton::EnableFlash() function may not exist in the compiled build.
2. The button definition in the UIScript file might be incomplete or incorrectly configured.
3. Integration between GameCore and PyRoot may be missing.
Solution Steps
The following steps can resolve the CButton::EnableFlash() error:
1. Check Client Source
First, ensure that the CButton class in your client source files includes the EnableFlash method. If this method does not exist, you might need to add an implementation like the following:
void CButton::EnableFlash(BOOL flag)
{
m_bFlashEnable = flag;
}
2. Define Correctly in UIScript File
Ensure that the button object is properly defined in the UIScript file. For example:
{'name': 'pm_button', 'type': 'button', 'text': 'Send Message', 'x': 10, 'y': 10}
3. PyRoot and UI Script Integration
When accessing the button object from the Python side, make sure to call the EnableFlash() function correctly. Example:
self.pm_button.EnableFlash(True)
Additional Issues in PM Button
In some Metin2 private servers, similar errors may occur if the private message button does not open or becomes systemically disabled. In such cases, the following checks should be performed:
- Ensure the connection between AuthServer and GameServer is established.
- Check whether access to the message system exists in the DB Core side.
- Confirm that PM system is enabled in Channel settings.
Conclusion
CButton::EnableFlash() errors are generally caused by minor code deficiencies. These issues can easily be resolved with correct source edit and compile operations. While dealing with such errors, it is recommended to use resources such as Martysama and other Metin2Dev materials. You can visit our forum for further technical support: Metin2Lobby
