Opublikowano 24 Października 202424 Paź Cześć, dodałem na serwer dungeon info w gui, wszystko działa poprawnie z wyjątkiem rankingów. Po zakończeniu wyprawy nie dodają się poprawne query do tabeli w bazie odpowiadającej za ranking. Nawet jeśli dodam poprawne query ręcznie to ranking nie jest odczytywany, sprawdzałem zapytania w .cpp i jak dla mnie wszystko wygląda poprawnie, dodałem sporo logów aby dojść do rozwiązania, ale niestety rozkładam już ręce. Pokazuje się błąd: GetRankingElement: Cannot find key Dungeon1 for dungeon info ranking. Nie może znaleźc klucza Dungeon1 w tabeli, ale kolejne logi pokazują że w tabeli jest jednak taki klucz, mimo to ranking w grze nie wyświetla się, nie ma żadnych pozycji. Syslog z db: Oct 24 16:21:13 :: ProcessPacket Header [151] Handle[0] Length[25] iCount[4] Oct 24 16:21:13 :: Test log: Entered DungeonInfoRankingUpdate function Oct 24 16:21:13 :: DungeonInfoRankingUpdate: Received header: 151 Oct 24 16:21:13 :: Rankings are being initialized for dungeon: Dungeon1 SYSERR: Oct 24 16:21:13 :: GetRankingElement: Cannot find key Dungeon1 for dungeon info ranking. Oct 24 16:21:13 :: New ranking registered! Rank key: Dungeon1 Oct 24 16:21:13 :: Fetched record: sKey=Dungeon1, iType=0, wPos=1, wLevel=150, sName=start, lValue=24 Oct 24 16:21:13 :: 1 values were fetched! Oct 24 16:21:13 :: Fetched record: sKey=Dungeon1, iType=0, wPos=1, wLevel=150, sName=start, lValue=24 Oct 24 16:21:13 :: 1 values were fetched! Oct 24 16:21:13 :: Fetched record: sKey=Dungeon1, iType=0, wPos=1, wLevel=150, sName=start, lValue=24 Oct 24 16:21:13 :: 1 values were fetched! Sysser z db: SYSERR: Oct 24 16:21:13 :: GetRankingElement: Cannot find key Dungeon1 for dungeon info ranking. Zawartość tabeli dungeon_info_ranking (wartość dodana przeze mnie ręcznie to ta 2, ta pierwszato ta dodana przez serwer, wartości sKey oraz sName są puste, reszta ma wartość 0.) mysql> SELECT * FROM dungeon_info_ranking; +----------+-------+------+--------+-------+--------+ | sKey | iType | wPos | wLevel | sName | lValue | +----------+-------+------+--------+-------+--------+ | | 0 | 0 | 0 | | 0 | | Dungeon1 | 0 | 1 | 150 | start | 65 | +----------+-------+------+--------+-------+--------+ 2 rows in set (0.03 sec) W załączniku wysyłam plik obsługujący ranking, z góry dzięki za pomoc. DungeonInfoRankingManager.cpp
Opublikowano 24 Października 202424 Paź Jesteś pewny, że CDungeonInfoRankingManager::SRankingElement::Flush() jest wołany? Brakuje logów "Flushing data:"
Opublikowano 24 Października 202424 Paź Autor 10 minut temu, samir napisał(a): Jesteś pewny, że CDungeonInfoRankingManager::SRankingElement::Flush() jest wołany? Brakuje logów "Flushing data:" Wybacz, nie dodałem ich do tematu. Oct 24 15:44:38 :: MainLoop exited, Starting cache flushing Oct 24 15:44:38 :: PlayerTableCache::Flush : start Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0);
Opublikowano 24 Października 202424 Paź 2 godziny temu, Zephyr napisał(a): Wybacz, nie dodałem ich do tematu. Oct 24 15:44:38 :: MainLoop exited, Starting cache flushing Oct 24 15:44:38 :: PlayerTableCache::Flush : start Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); Oct 24 15:44:38 :: Flushing data: sKey=, sName=, iType=0, wPos=0, wLevel=0, lValue=0 Oct 24 15:44:38 :: SQL Query: REPLACE INTO player.dungeon_info_ranking VALUE ('', 0, 0, 0, '', 0); No to po logach widać, że on tam nawet nie ma co zaktualizować, idą replace z pustymi wartościami. Problem gdzieś wyżej na a_rankings_record, elementy są dodawane do niego prawidłowo?
Opublikowano 24 Października 202424 Paź Autor Godzinę temu, samir napisał(a): No to po logach widać, że on tam nawet nie ma co zaktualizować, idą replace z pustymi wartościami. Problem gdzieś wyżej na a_rankings_record, elementy są dodawane do niego prawidłowo? W załączonym przeze mnie pliku pozmieniałem kilka linijek kodu na rzecz logów, podsyłam tutaj jeszcze oryginalne pliki bez edycji oraz brakujący .hpp. Być może sam wprowadzilem nieumyslnie jakieś błędy podczas tej edycji. DungeonInfoRankingManager.cpp DungeonInfoRankingManager.hpp
Opublikowano 24 Października 202424 Paź Nie będę szukał za Ciebie problemu, wskazałem co mówią logi. Jeżeli nie wprowadzałeś istotnych zmian, które są dla Ciebie ważne po prostu przywróć oryginalne pliki i sprawdź czy na nich działa. Jeżeli zadziała to masz trop i porównuj wtedy zmiany.
Opublikowano 25 Października 202425 Paź Autor 11 godzin temu, samir napisał(a): Nie będę szukał za Ciebie problemu, wskazałem co mówią logi. Jeżeli nie wprowadzałeś istotnych zmian, które są dla Ciebie ważne po prostu przywróć oryginalne pliki i sprawdź czy na nich działa. Jeżeli zadziała to masz trop i porównuj wtedy zmiany. Nie oczekuje tego, tylko ten trop niewiele mi daje. Na oryginalnym pliku w ogóle nie inicjuje rankingu, wyrzuca błąd: if (!bInit) { sys_err("Rankings were already initialized."); return; } Zmieniłem to na: if (!bInit) { sys_log(0, "Rankings are being initialized for dungeon: %s", sName.c_str()); bInit = true; } Po tej zmianie rankingi się wczytują i pokazują inne logi, ale tak jak napisałem w temacie, wartości nie dodają oraz nie odczytują się poprawnie. Przejrzę jeszcze raz reszte kodu, być może w innym miejscu jest problem.
Opublikowano 25 Października 202425 Paź Rozwiązanie 1 godzinę temu, Zephyr napisał(a): Nie oczekuje tego, tylko ten trop niewiele mi daje. Na oryginalnym pliku w ogóle nie inicjuje rankingu, wyrzuca błąd: if (!bInit) { sys_err("Rankings were already initialized."); return; } Zmieniłem to na: if (!bInit) { sys_log(0, "Rankings are being initialized for dungeon: %s", sName.c_str()); bInit = true; } Po tej zmianie rankingi się wczytują i pokazują inne logi, ale tak jak napisałem w temacie, wartości nie dodają oraz nie odczytują się poprawnie. Przejrzę jeszcze raz reszte kodu, być może w innym miejscu jest problem. No to sam sobie odpowiedziałeś, sprawdź dlaczego nie dochodzi do inicjalizacji systemu. If który podmieniłeś faktycznie zainicjuje Ci system ale nie będzie działać poprawnie.
Opublikowano 28 Października 202428 Paź Autor W dniu 27.10.2024 o 21:00, Draha napisał(a): A skąd pan wziął ten system? Zachęcam napisać do autora Idąc tym tokiem myślenia, może nikt nie powinien tworzyć tematów na forum, tylko od razu pisać do koreańców skoro to ich pliki ( ͡° ͜ʖ ͡°)