america23 1 Posted September 3, 2022 Share Posted September 3, 2022 Hello, does anyone know how to solve this one? ShipDefense.cpp: In function 'long int LaserEffectEvent(LPEVENT, long int)': ShipDefense.cpp:480:8: error: 'random_device' is not a member of 'std' std::random_device RandomDevice; ^~~~~~~~~~~~~ ShipDefense.cpp:480:8: note: suggested alternative: 'ratio_divide' std::random_device RandomDevice; ^~~~~~~~~~~~~ ratio_divide ShipDefense.cpp:481:8: error: 'mt19937' is not a member of 'std' std::mt19937 Generate(RandomDevice()); ^~~~~~~ ShipDefense.cpp:482:8: error: 'uniform_real_distribution' is not a member of 'std' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ ShipDefense.cpp:482:8: note: suggested alternative: 'uniform_int_distribution' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ uniform_int_distribution ShipDefense.cpp:482:34: error: expected primary-expression before '>' token std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^ ShipDefense.cpp:482:36: error: 'Distribute' was not declared in this scope std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ ShipDefense.cpp:482:36: note: suggested alternative: 'CAttribute' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ CAttribute ShipDefense.cpp:498:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= uiSpawnProbability) ^~~~~~~~ ShipDefense.cpp:498:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= uiSpawnProbability) ^~~~~~~~ rename ShipDefense.cpp: In function 'long int SpawnEvent(LPEVENT, long int)': ShipDefense.cpp:598:7: error: 'random_device' is not a member of 'std' std::random_device RandomDevice; ^~~~~~~~~~~~~ ShipDefense.cpp:598:7: note: suggested alternative: 'ratio_divide' std::random_device RandomDevice; ^~~~~~~~~~~~~ ratio_divide ShipDefense.cpp:599:7: error: 'mt19937' is not a member of 'std' std::mt19937 Generate(RandomDevice()); ^~~~~~~ ShipDefense.cpp:600:7: error: 'uniform_real_distribution' is not a member of 'std' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ ShipDefense.cpp:600:7: note: suggested alternative: 'uniform_int_distribution' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ uniform_int_distribution ShipDefense.cpp:600:33: error: expected primary-expression before '>' token std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^ ShipDefense.cpp:600:35: error: 'Distribute' was not declared in this scope std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ ShipDefense.cpp:600:35: note: suggested alternative: 'CAttribute' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ CAttribute ShipDefense.cpp:632:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:632:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:635:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 30) // 3% ^~~~~~~~ ShipDefense.cpp:635:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 30) // 3% ^~~~~~~~ rename ShipDefense.cpp:661:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:661:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:664:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 40) // 4% ^~~~~~~~ ShipDefense.cpp:664:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 40) // 4% ^~~~~~~~ rename ShipDefense.cpp:690:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:690:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:693:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 50) // 5% ^~~~~~~~ ShipDefense.cpp:693:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 50) // 5% ^~~~~~~~ rename gmake: *** [Makefile:162: .obj/ShipDefense.o] Error 1 gmake: *** Waiting for unfinished jobs.... 1 Link to comment Share on other sites More sharing options...
sibermaster 2 Posted September 3, 2022 Share Posted September 3, 2022 56 minutes ago, america23 said: Hello, does anyone know how to solve this one? ShipDefense.cpp: In function 'long int LaserEffectEvent(LPEVENT, long int)': ShipDefense.cpp:480:8: error: 'random_device' is not a member of 'std' std::random_device RandomDevice; ^~~~~~~~~~~~~ ShipDefense.cpp:480:8: note: suggested alternative: 'ratio_divide' std::random_device RandomDevice; ^~~~~~~~~~~~~ ratio_divide ShipDefense.cpp:481:8: error: 'mt19937' is not a member of 'std' std::mt19937 Generate(RandomDevice()); ^~~~~~~ ShipDefense.cpp:482:8: error: 'uniform_real_distribution' is not a member of 'std' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ ShipDefense.cpp:482:8: note: suggested alternative: 'uniform_int_distribution' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ uniform_int_distribution ShipDefense.cpp:482:34: error: expected primary-expression before '>' token std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^ ShipDefense.cpp:482:36: error: 'Distribute' was not declared in this scope std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ ShipDefense.cpp:482:36: note: suggested alternative: 'CAttribute' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ CAttribute ShipDefense.cpp:498:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= uiSpawnProbability) ^~~~~~~~ ShipDefense.cpp:498:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= uiSpawnProbability) ^~~~~~~~ rename ShipDefense.cpp: In function 'long int SpawnEvent(LPEVENT, long int)': ShipDefense.cpp:598:7: error: 'random_device' is not a member of 'std' std::random_device RandomDevice; ^~~~~~~~~~~~~ ShipDefense.cpp:598:7: note: suggested alternative: 'ratio_divide' std::random_device RandomDevice; ^~~~~~~~~~~~~ ratio_divide ShipDefense.cpp:599:7: error: 'mt19937' is not a member of 'std' std::mt19937 Generate(RandomDevice()); ^~~~~~~ ShipDefense.cpp:600:7: error: 'uniform_real_distribution' is not a member of 'std' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ ShipDefense.cpp:600:7: note: suggested alternative: 'uniform_int_distribution' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ uniform_int_distribution ShipDefense.cpp:600:33: error: expected primary-expression before '>' token std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^ ShipDefense.cpp:600:35: error: 'Distribute' was not declared in this scope std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ ShipDefense.cpp:600:35: note: suggested alternative: 'CAttribute' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ CAttribute ShipDefense.cpp:632:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:632:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:635:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 30) // 3% ^~~~~~~~ ShipDefense.cpp:635:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 30) // 3% ^~~~~~~~ rename ShipDefense.cpp:661:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:661:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:664:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 40) // 4% ^~~~~~~~ ShipDefense.cpp:664:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 40) // 4% ^~~~~~~~ rename ShipDefense.cpp:690:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:690:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:693:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 50) // 5% ^~~~~~~~ ShipDefense.cpp:693:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 50) // 5% ^~~~~~~~ rename gmake: *** [Makefile:162: .obj/ShipDefense.o] Error 1 gmake: *** Waiting for unfinished jobs.... What is your GCC version? Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8173 Posted September 3, 2022 Author Honorable Member Share Posted September 3, 2022 @america23, #include <random> Spoiler 1 hour ago, america23 said: Hello, does anyone know how to solve this one? ShipDefense.cpp: In function 'long int LaserEffectEvent(LPEVENT, long int)': ShipDefense.cpp:480:8: error: 'random_device' is not a member of 'std' std::random_device RandomDevice; ^~~~~~~~~~~~~ ShipDefense.cpp:480:8: note: suggested alternative: 'ratio_divide' std::random_device RandomDevice; ^~~~~~~~~~~~~ ratio_divide ShipDefense.cpp:481:8: error: 'mt19937' is not a member of 'std' std::mt19937 Generate(RandomDevice()); ^~~~~~~ ShipDefense.cpp:482:8: error: 'uniform_real_distribution' is not a member of 'std' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ ShipDefense.cpp:482:8: note: suggested alternative: 'uniform_int_distribution' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ uniform_int_distribution ShipDefense.cpp:482:34: error: expected primary-expression before '>' token std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^ ShipDefense.cpp:482:36: error: 'Distribute' was not declared in this scope std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ ShipDefense.cpp:482:36: note: suggested alternative: 'CAttribute' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ CAttribute ShipDefense.cpp:498:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= uiSpawnProbability) ^~~~~~~~ ShipDefense.cpp:498:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= uiSpawnProbability) ^~~~~~~~ rename ShipDefense.cpp: In function 'long int SpawnEvent(LPEVENT, long int)': ShipDefense.cpp:598:7: error: 'random_device' is not a member of 'std' std::random_device RandomDevice; ^~~~~~~~~~~~~ ShipDefense.cpp:598:7: note: suggested alternative: 'ratio_divide' std::random_device RandomDevice; ^~~~~~~~~~~~~ ratio_divide ShipDefense.cpp:599:7: error: 'mt19937' is not a member of 'std' std::mt19937 Generate(RandomDevice()); ^~~~~~~ ShipDefense.cpp:600:7: error: 'uniform_real_distribution' is not a member of 'std' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ ShipDefense.cpp:600:7: note: suggested alternative: 'uniform_int_distribution' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~~~~~~~~~~~~~~~~ uniform_int_distribution ShipDefense.cpp:600:33: error: expected primary-expression before '>' token std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^ ShipDefense.cpp:600:35: error: 'Distribute' was not declared in this scope std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ ShipDefense.cpp:600:35: note: suggested alternative: 'CAttribute' std::uniform_real_distribution<> Distribute(ShipDefense::MIN_PROB, ShipDefense::MAX_PROB); ^~~~~~~~~~ CAttribute ShipDefense.cpp:632:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:632:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:635:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 30) // 3% ^~~~~~~~ ShipDefense.cpp:635:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 30) // 3% ^~~~~~~~ rename ShipDefense.cpp:661:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:661:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:664:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 40) // 4% ^~~~~~~~ ShipDefense.cpp:664:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 40) // 4% ^~~~~~~~ rename ShipDefense.cpp:690:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ ShipDefense.cpp:690:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 10) // 1% ^~~~~~~~ rename ShipDefense.cpp:693:36: error: 'Generate' was not declared in this scope if (static_cast<UINT>(Distribute(Generate)) <= 50) // 5% ^~~~~~~~ ShipDefense.cpp:693:36: note: suggested alternative: 'rename' if (static_cast<UINT>(Distribute(Generate)) <= 50) // 5% ^~~~~~~~ rename gmake: *** [Makefile:162: .obj/ShipDefense.o] Error 1 gmake: *** Waiting for unfinished jobs.... 1 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
sibermaster 2 Posted September 4, 2022 Share Posted September 4, 2022 (edited) syserr.txt: empty 2. Problem : Ship defense gives game.core a few minutes after it starts Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8173 Posted September 4, 2022 Author Honorable Member Share Posted September 4, 2022 (edited) @sibermaster, if you expect help without providing any information then I'm afraid you're out of luck... I'm not a magician to know what the problem is so please, instead of making the topic a mess how about you show us the crash log of the core or maybe review the implementation steps. Edited September 4, 2022 by Owsap 2 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
Premium Mano 22 Posted September 4, 2022 Premium Share Posted September 4, 2022 (edited) 11 hours ago, sibermaster said: syserr.txt: empty 2. Problem : Ship defense gives game.core a few minutes after it starts make sure that the value of max_hp is set right on mob_proto.txt Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
sibermaster 2 Posted September 5, 2022 Share Posted September 5, 2022 (edited) @ OwsapMast HP Board Tooltip Problem Nothing Syserr: Edit: Problem fixed. root-> uiTarget.py: Search: hpGauge.SetOverEvent(ui.__mem_func__(self.IsIn)) hpGauge.SetOverOutEvent(ui.__mem_func__(self.IsOut)) Replace: hpGauge.OnMouseOverIn = ui.__mem_func__(hpGauge.ShowToolTip) hpGauge.OnMouseOverOut = ui.__mem_func__(hpGauge.HideToolTip) hpGauge.SetShowToolTipEvent(hpGauge.OnMouseOverIn) hpGauge.SetHideToolTipEvent(hpGauge.OnMouseOverOut) Search: self.toolTipHP.SetText("%s : %d / %d" % (localeInfo.TASKBAR_HP, hp, hpMax)) Replace: self.hpGauge.SetToolTipText("%s : %d / %d" % (localeInfo.TASKBAR_HP, hp, hpMax)) Edited September 5, 2022 by sibermaster Link to comment Share on other sites More sharing options...
chmkar 0 Posted September 7, 2022 Share Posted September 7, 2022 @ OwsapCan you help me solve this error compiling ShipDefense.cpp In file included from ShipDefense.cpp:18: ShipDefense.h:188:7: error: 'time_t' in namespace 'std' does not name a type std::time_t GetStartTime() const { return m_lStartTime; } ^~~~~~ ShipDefense.h:188:2: note: suggested alternative: 'time_put' std::time_t GetStartTime() const { return m_lStartTime; } ^~~ time_put ShipDefense.h:218:7: error: 'time_t' in namespace 'std' does not name a type std::time_t m_lStartTime; ^~~~~~ ShipDefense.h:218:2: note: suggested alternative: 'time_put' std::time_t m_lStartTime; ^~~ time_put ShipDefense.cpp: In constructor 'CShipDefense::CShipDefense(long int, DWORD)': ShipDefense.cpp:480:2: error: 'm_lStartTime' was not declared in this scope m_lStartTime = 0; ^~~~~~~~~~~~ ShipDefense.cpp:480:2: note: suggested alternative: 'm_byState' m_lStartTime = 0; ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'virtual void CShipDefense::Destroy()': ShipDefense.cpp:505:2: error: 'm_lStartTime' was not declared in this scope m_lStartTime = 0; ^~~~~~~~~~~~ ShipDefense.cpp:505:2: note: suggested alternative: 'm_byState' m_lStartTime = 0; ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'void CShipDefense::Notice(LPCHARACTER, bool, const char*, ...)': ShipDefense.cpp:602:7: warning: unused variable 'iLen' [-Wunused-variable] int iLen = vsnprintf(szBuf, sizeof(szBuf), c_pszLocaleText, pszArgs); ^~~~ ShipDefense.cpp: In member function 'void CShipDefense::Start()': ShipDefense.cpp:1023:2: error: 'm_lStartTime' was not declared in this scope m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ ShipDefense.cpp:1023:2: note: suggested alternative: 'm_byState' m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'bool CShipDefense::PrepareDeck()': ShipDefense.cpp:1059:3: error: 'm_lStartTime' was not declared in this scope m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ ShipDefense.cpp:1059:3: note: suggested alternative: 'm_byState' m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'void CShipDefense::JumpAll(ShipDefense::EJumpTo)': ShipDefense.cpp:1301:9: warning: enumeration value 'JUMP_MAX' not handled in switch [-Wswitch] switch (eJumpTo) Link to comment Share on other sites More sharing options...
sibermaster 2 Posted September 7, 2022 Share Posted September 7, 2022 1 hour ago, chmkar said: @ OwsapCan you help me solve this error compiling ShipDefense.cpp In file included from ShipDefense.cpp:18: ShipDefense.h:188:7: error: 'time_t' in namespace 'std' does not name a type std::time_t GetStartTime() const { return m_lStartTime; } ^~~~~~ ShipDefense.h:188:2: note: suggested alternative: 'time_put' std::time_t GetStartTime() const { return m_lStartTime; } ^~~ time_put ShipDefense.h:218:7: error: 'time_t' in namespace 'std' does not name a type std::time_t m_lStartTime; ^~~~~~ ShipDefense.h:218:2: note: suggested alternative: 'time_put' std::time_t m_lStartTime; ^~~ time_put ShipDefense.cpp: In constructor 'CShipDefense::CShipDefense(long int, DWORD)': ShipDefense.cpp:480:2: error: 'm_lStartTime' was not declared in this scope m_lStartTime = 0; ^~~~~~~~~~~~ ShipDefense.cpp:480:2: note: suggested alternative: 'm_byState' m_lStartTime = 0; ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'virtual void CShipDefense::Destroy()': ShipDefense.cpp:505:2: error: 'm_lStartTime' was not declared in this scope m_lStartTime = 0; ^~~~~~~~~~~~ ShipDefense.cpp:505:2: note: suggested alternative: 'm_byState' m_lStartTime = 0; ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'void CShipDefense::Notice(LPCHARACTER, bool, const char*, ...)': ShipDefense.cpp:602:7: warning: unused variable 'iLen' [-Wunused-variable] int iLen = vsnprintf(szBuf, sizeof(szBuf), c_pszLocaleText, pszArgs); ^~~~ ShipDefense.cpp: In member function 'void CShipDefense::Start()': ShipDefense.cpp:1023:2: error: 'm_lStartTime' was not declared in this scope m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ ShipDefense.cpp:1023:2: note: suggested alternative: 'm_byState' m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'bool CShipDefense::PrepareDeck()': ShipDefense.cpp:1059:3: error: 'm_lStartTime' was not declared in this scope m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ ShipDefense.cpp:1059:3: note: suggested alternative: 'm_byState' m_lStartTime = std::time(nullptr); ^~~~~~~~~~~~ m_byState ShipDefense.cpp: In member function 'void CShipDefense::JumpAll(ShipDefense::EJumpTo)': ShipDefense.cpp:1301:9: warning: enumeration value 'JUMP_MAX' not handled in switch [-Wswitch] switch (eJumpTo) In stdafx.h paste this code: #include <ctime> 1 Link to comment Share on other sites More sharing options...
BadGrecee 4 Posted September 12, 2022 Share Posted September 12, 2022 (edited) When I enter the game, the health indicator appears. When you enter the dungeon, there are 2 health indicators. How can I fix this. _get_special_item_group I don't have this. Edited September 13, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
sibermaster 2 Posted September 13, 2022 Share Posted September 13, 2022 (edited) 3 hours ago, BadGrecee said: When I enter the game, the health indicator appears. When you enter the dungeon, there are 2 health indicators. How can I fix this. _get_special_item_group I don't have this. uiscript->minimap.py search: MastWindow and delete this window class Edited September 13, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
BadGrecee 4 Posted September 13, 2022 Share Posted September 13, 2022 (edited) I tried the dungeon 2 3 times and there were no kernel crashes. I just tried the dungeon again and when the pole was smashed there was a kernel crash. Also, it cannot find the gate ticket object in the inventory, which is required when starting the defense. define TICKET_GROUP 71162 (item_names.txt contains this item) Problem : local ticketGroup = { get_special_item_group(TICKET_GROUP) } not working. ch99 Syserr _get_special_item_group: cannot find special item group 71162 Edit : I searched questlua_globa.cpp and the item should be in special_item_group. Group ship_defense_ticket_group { vnum 10033 1 71162 1 1 } Edited September 13, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
sibermaster 2 Posted September 13, 2022 Share Posted September 13, 2022 3 hours ago, BadGrecee said: I tried the dungeon 2 3 times and there were no kernel crashes. I just tried the dungeon again and when the pole was smashed there was a kernel crash. Also, it cannot find the gate ticket object in the inventory, which is required when starting the defense. define TICKET_GROUP 71162 (item_names.txt contains this item) Problem : local ticketGroup = { get_special_item_group(TICKET_GROUP) } not working. ch99 Syserr _get_special_item_group: cannot find special item group 71162 Edit : I searched questlua_globa.cpp and the item should be in special_item_group. Group ship_defense_ticket_group { vnum 10033 1 71162 1 1 } Is your problem solved? Link to comment Share on other sites More sharing options...
BadGrecee 4 Posted September 14, 2022 Share Posted September 14, 2022 15 hours ago, sibermaster said: Is your problem solved? The kernel doesn't always crash. It could also be from the server. Because I tested the dungeon several times and there was no core crash. I tested again and this time it was a kernel crash. Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2426 Posted September 14, 2022 Developer Share Posted September 14, 2022 (edited) 6 hours ago, BadGrecee said: The kernel doesn't always crash. It could also be from the server. Because I tested the dungeon several times and there was no core crash. I tested again and this time it was a kernel crash. A crash happening on checkpoint usually means execution fall in an infinite loop or a signal received by the kernel caused by an exception. The call inside boost make me think you got corrupted stack or heap, making execution looping in that element ordering routine or trying overwrite unaccessible memory addresses. I can't deduce more just by reading that trace. In the case you are using an old boost release, it would be a good idea to update it. EDIT --- You should type <RET> while reading the .core in order to get more trace. Edited September 14, 2022 by Ikarus_ My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
BadGrecee 4 Posted September 14, 2022 Share Posted September 14, 2022 6 hours ago, Ikarus_ said: A crash happening on checkpoint usually means execution fall in an infinite loop or a signal received by the kernel caused by an exception. The call inside boost make me think you got corrupted stack or heap, making execution looping in that element ordering routine or trying overwrite unaccessible memory addresses. I can't deduce more just by reading that trace. In the case you are using an old boost release, it would be a good idea to update it. EDIT --- You should type <RET> while reading the .core in order to get more trace. <RET> btfull ? Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2426 Posted September 14, 2022 Developer Share Posted September 14, 2022 1 hour ago, BadGrecee said: <RET> btfull ? No, Once you typed bt full the last line says: Type <RET> for more, [....] So if you type <RET> it shows more My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8173 Posted September 22, 2022 Author Honorable Member Share Posted September 22, 2022 (edited) Fixed and improved some stuff. Go the repository! Fixed party entry. Rearrange ticket check. Add quest to warp from port to village. Added cooldown. Increased monster spawn. Do you want this? I have also added the rankings like the official. This system has already been shared here from @ Mali although you will have to adapt it. If you would like to use my version, I would suggest a poll, https://forms.gle/zRovvNrdY6we9UrX7 Edited September 23, 2022 by Metin2 Dev Core X - External 2 Internal 11 2 7 https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
BadGrecee 4 Posted September 23, 2022 Share Posted September 23, 2022 19 hours ago, Owsap said: Fixed and improved some stuff. Go the repository! Fixed party entry. Rearrange ticket check. Add quest to warp from port to village. Added cooldown. Increased monster spawn. Do you want this? I have also added the rankings like the official. This system has already been shared here from @ Mali although you will have to adapt it. If you would like to use my version, I would suggest a poll, https://forms.gle/zRovvNrdY6we9UrX7 wait_time_to_str(pc.getqf("cooldown")))) wait_time_to_str this function does not exist. Link to comment Share on other sites More sharing options...
Honorable Member Owsap 8173 Posted September 23, 2022 Author Honorable Member Share Posted September 23, 2022 @BadGrecee, Quote 2 hours ago, BadGrecee said: wait_time_to_str(pc.getqf("cooldown")))) wait_time_to_str this function does not exist. Repository updated. https://owsap.dev/ / https://osf.owsap.dev/ Link to comment Share on other sites More sharing options...
PeterCZ 1 Posted September 26, 2022 Share Posted September 26, 2022 On 9/5/2022 at 3:49 AM, sibermaster said: @ OwsapMast HP Board Tooltip Problem Nothing Syserr: Edit: Problem fixed. root-> uiTarget.py: Search: hpGauge.SetOverEvent(ui.__mem_func__(self.IsIn)) hpGauge.SetOverOutEvent(ui.__mem_func__(self.IsOut)) Replace: hpGauge.OnMouseOverIn = ui.__mem_func__(hpGauge.ShowToolTip) hpGauge.OnMouseOverOut = ui.__mem_func__(hpGauge.HideToolTip) hpGauge.SetShowToolTipEvent(hpGauge.OnMouseOverIn) hpGauge.SetHideToolTipEvent(hpGauge.OnMouseOverOut) Search: self.toolTipHP.SetText("%s : %d / %d" % (localeInfo.TASKBAR_HP, hp, hpMax)) Replace: self.hpGauge.SetToolTipText("%s : %d / %d" % (localeInfo.TASKBAR_HP, hp, hpMax)) Hello I am still solving this problem 0926 18:17:29551 :: File "networkModule.py", line 263, in SetGamePhase 0926 18:17:29552 :: File "game.py", line 156, in __init__ 0926 18:17:29552 :: File "uiTarget.py", line 1169, in __init__ 0926 18:17:29552 :: AttributeError 0926 18:17:29552 :: : 0926 18:17:29552 :: 'Gauge' object has no attribute 'ShowToolTip' 0926 18:17:29552 :: How to solve this? Thank you Link to comment Share on other sites More sharing options...
BadGrecee 4 Posted September 27, 2022 Share Posted September 27, 2022 22 hours ago, PeterCZ said: Hello I am still solving this problem 0926 18:17:29551 :: File "networkModule.py", line 263, in SetGamePhase 0926 18:17:29552 :: File "game.py", line 156, in __init__ 0926 18:17:29552 :: File "uiTarget.py", line 1169, in __init__ 0926 18:17:29552 :: AttributeError 0926 18:17:29552 :: : 0926 18:17:29552 :: 'Gauge' object has no attribute 'ShowToolTip' 0926 18:17:29552 :: How to solve this? Thank you Hi bro I will help you. Open the ui.py file and class Gauge(Window): search for this class then replace with the class I gave. Note: If there are systems you have added before, edit them according to you. See: if app.ENABLE_SHIP_DEFENSE: class Gauge(Window): SLOT_WIDTH = 16 SLOT_HEIGHT = 7 GAUGE_TEMPORARY_PLACE = 12 GAUGE_WIDTH = 16 def __init__(self): Window.__init__(self) self.width = 0 if app.ENABLE_SHIP_DEFENSE: self.ShowToolTipEvent = None self.ShowToolTipArg = None self.HideToolTipEvent = None self.HideToolTipArg = None self.ToolTipText = None def __del__(self): Window.__del__(self) if app.ENABLE_SHIP_DEFENSE: self.ShowToolTipEvent = None self.ShowToolTipArg = None self.HideToolTipEvent = None self.HideToolTipArg = None def MakeGauge(self, width, color): self.width = max(48, width) imgSlotLeft = ImageBox() imgSlotLeft.SetParent(self) imgSlotLeft.LoadImage("d:/ymir work/ui/pattern/gauge_slot_left.tga") imgSlotLeft.Show() imgSlotRight = ImageBox() imgSlotRight.SetParent(self) imgSlotRight.LoadImage("d:/ymir work/ui/pattern/gauge_slot_right.tga") imgSlotRight.Show() imgSlotRight.SetPosition(width - self.SLOT_WIDTH, 0) imgSlotCenter = ExpandedImageBox() imgSlotCenter.SetParent(self) imgSlotCenter.LoadImage("d:/ymir work/ui/pattern/gauge_slot_center.tga") imgSlotCenter.Show() imgSlotCenter.SetRenderingRect(0.0, 0.0, float((width - self.SLOT_WIDTH*2) - self.SLOT_WIDTH) / self.SLOT_WIDTH, 0.0) imgSlotCenter.SetPosition(self.SLOT_WIDTH, 0) imgGauge = ExpandedImageBox() imgGauge.SetParent(self) imgGauge.LoadImage("d:/ymir work/ui/pattern/gauge_" + color + ".tga") imgGauge.Show() imgGauge.SetRenderingRect(0.0, 0.0, 0.0, 0.0) imgGauge.SetPosition(self.GAUGE_TEMPORARY_PLACE, 0) imgSlotLeft.AddFlag("attach") imgSlotCenter.AddFlag("attach") imgSlotRight.AddFlag("attach") self.imgLeft = imgSlotLeft self.imgCenter = imgSlotCenter self.imgRight = imgSlotRight self.imgGauge = imgGauge self.SetSize(width, self.SLOT_HEIGHT) def SetPercentage(self, curValue, maxValue): if maxValue > 0.0: percentage = min(1.0, float(curValue)/float(maxValue)) else: percentage = 0.0 gaugeSize = -1.0 + float(self.width - self.GAUGE_TEMPORARY_PLACE*2) * percentage / self.GAUGE_WIDTH self.imgGauge.SetRenderingRect(0.0, 0.0, gaugeSize, 0.0) if app.ENABLE_SHIP_DEFENSE: def SetShowToolTipEvent(self, func, *args): self.ShowToolTipEvent = func self.ShowToolTipArg = args def SetHideToolTipEvent(self, func, *args): self.HideToolTipEvent = func self.HideToolTipArg = args def ShowToolTip(self): if self.ToolTipText: self.ToolTipText.Show() def HideToolTip(self): if self.ToolTipText: self.ToolTipText.Hide() def SetToolTipText(self, text, x=0, y = -19): self.SetFormToolTipText("TEXT", text, x, y) def SetFormToolTipText(self, type, text, x, y): if not self.ToolTipText: toolTip=createToolTipWindowDict[type]() toolTip.SetParent(self) toolTip.SetSize(0, 0) toolTip.SetHorizontalAlignCenter() toolTip.SetOutline() toolTip.Hide() toolTip.SetPosition(x + self.GetWidth()/2, y) self.ToolTipText=toolTip self.ToolTipText.SetText(text) 1 Link to comment Share on other sites More sharing options...
bekolay1 52 Posted October 10, 2022 Share Posted October 10, 2022 if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_KNOCKBACK)) { float fKnockbackLength = 300; // Knockback distance. Firstly, thank you. There is no such code. Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2513 Posted October 10, 2022 Forum Moderator Share Posted October 10, 2022 29 minutes ago, bekolay1 said: if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_KNOCKBACK)) { float fKnockbackLength = 300; // Knockback distance. Firstly, thank you. There is no such code. https://metin2.dev/topic/21992-knockback-patch-skill-175-official-servers/ 1 Gurgarath coming soon Link to comment Share on other sites More sharing options...
bekolay1 52 Posted October 11, 2022 Share Posted October 11, 2022 ShipDefense.cpp: In constructor 'CShipDefense::CShipDefense(long int, DWORD)': ShipDefense.cpp:514:2: error: 'memset' is not a member of 'std' std::memset(&m_lpBarrier, 0, sizeof(m_lpBarrier)); ^ ShipDefense.cpp:514:2: note: suggested alternative: In file included from ../../libthecore/include/stdafx.h:89:0, from stdafx.h:12, from ShipDefense.cpp:15: /usr/include/string.h:67:7: note: 'memset' void *memset(void *, int, size_t); ^ ShipDefense.cpp: In member function 'virtual void CShipDefense::Destroy()': ShipDefense.cpp:542:2: error: 'memset' is not a member of 'std' std::memset(&m_lpBarrier, 0, sizeof(m_lpBarrier)); ^ ShipDefense.cpp:542:2: note: suggested alternative: In file included from ../../libthecore/include/stdafx.h:89:0, from stdafx.h:12, from ShipDefense.cpp:15: /usr/include/string.h:67:7: note: 'memset' void *memset(void *, int, size_t); ^ gmake: *** [.obj/ShipDefense.o] Error 1 it gives an error like this Link to comment Share on other sites More sharing options...
Recommended Posts