DoIIar 5 Posted August 14, 2022 Share Posted August 14, 2022 (edited) Helle Guys, I have a problem when installing Dargon Soul Changre Attribute https://metin2.dev/topic/29242-dragon-soul-change-attribute/ problem in source Server >>> DragonSoul.cpp https://metin2.download/picture/FWMf69kDGPNLw7356YzU0aGU695CRX5w/.png Is there a solution please? Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
DoIIar 5 Posted August 14, 2022 Author Share Posted August 14, 2022 Up Link to comment Share on other sites More sharing options...
DoIIar 5 Posted August 15, 2022 Author Share Posted August 15, 2022 up Link to comment Share on other sites More sharing options...
SamuraiHUN 1548 Posted August 15, 2022 Share Posted August 15, 2022 item_length.h search this: enum EMaterialSubTypes { MATERIAL_LEATHER, MATERIAL_BLOOD, MATERIAL_ROOT, MATERIAL_NEEDLE, MATERIAL_JEWEL, MATERIAL_DS_REFINE_NORMAL, MATERIAL_DS_REFINE_BLESSED, MATERIAL_DS_REFINE_HOLLY, }; extend with this: enum EMaterialSubTypes { MATERIAL_LEATHER, MATERIAL_BLOOD, MATERIAL_ROOT, MATERIAL_NEEDLE, MATERIAL_JEWEL, MATERIAL_DS_REFINE_NORMAL, MATERIAL_DS_REFINE_BLESSED, MATERIAL_DS_REFINE_HOLLY, #if defined(__DS_CHANGE_ATTR__) MATERIAL_DS_CHANGE_ATTR, #endif }; DragonSoul.cpp nullptr change to: NULL Link to comment Share on other sites More sharing options...
DoIIar 5 Posted August 16, 2022 Author Share Posted August 16, 2022 (edited) 8 hours ago, SamuraiHUN said: item_length.h search this: enum EMaterialSubTypes { MATERIAL_LEATHER, MATERIAL_BLOOD, MATERIAL_ROOT, MATERIAL_NEEDLE, MATERIAL_JEWEL, MATERIAL_DS_REFINE_NORMAL, MATERIAL_DS_REFINE_BLESSED, MATERIAL_DS_REFINE_HOLLY, }; extend with this: enum EMaterialSubTypes { MATERIAL_LEATHER, MATERIAL_BLOOD, MATERIAL_ROOT, MATERIAL_NEEDLE, MATERIAL_JEWEL, MATERIAL_DS_REFINE_NORMAL, MATERIAL_DS_REFINE_BLESSED, MATERIAL_DS_REFINE_HOLLY, #if defined(__DS_CHANGE_ATTR__) MATERIAL_DS_CHANGE_ATTR, #endif }; DragonSoul.cpp nullptr change to: NULL I did what you asked of me I also replaced > nullptr I replaced it > NULL who is in DragonSoul.cpp questlua_dragonsoul.cpp char_dragonsoul.cpp https://metin2.download/picture/rAwjRV3uB0ybOq8rMoKaqsq2wcJpqbBZ/.png But the problem is still there wait here This is the hidden content, please Sign In or Sign Up Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 3 2 Link to comment Share on other sites More sharing options...
Premium Intel 757 Posted August 16, 2022 Premium Share Posted August 16, 2022 (edited) 4 hours ago, DoIIar said: I did what you asked of me I also replaced > nullptr I replaced it > NULL who is in DragonSoul.cpp questlua_dragonsoul.cpp char_dragonsoul.cpp https://metin2.download/picture/U129KoE0yfl8S6W0xpH1SNGgEXiFoeLf/.png But the problem is still there wait here This is the hidden content, please Sign In or Sign Up https://en.cppreference.com/w/cpp/language/range-for You need c++11. If you are still using C++03/C++98 you can't use: for (auto lpItem : setItems) Instead: std::set<LPITEMS>::iterator itr; for (itr = setItems.begin(); itr != setItems.end(); itr++) and wherever lpItem in the loop is used, in this case needs to be replaced with *itr Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
DoIIar 5 Posted August 17, 2022 Author Share Posted August 17, 2022 23 hours ago, xXIntelXx said: https://en.cppreference.com/w/cpp/language/range-for You need c++11. If you are still using C++03/C++98 you can't use: for (auto lpItem : setItems) Instead: std::set<LPITEMS>::iterator itr; for (itr = setItems.begin(); itr != setItems.end(); itr++) and wherever lpItem in the loop is used, in this case needs to be replaced with *itr I logged in but did not understand how to install C++11 Link to comment Share on other sites More sharing options...
Premium Intel 757 Posted August 17, 2022 Premium Share Posted August 17, 2022 (edited) 6 minutes ago, DoIIar said: I logged in but did not understand how to install C++11 You don't "install" c+11, you say to the compiler what version of C++ you intend to compile the files with. Depending on your gcc version (the compiler), the default might very well be a version prior c++11 who doesn't have for range loops ( for(auto x : container) ). Usually you define the version in the CXXFLAGS (declared in the Makefile), using -std=c++11 but that might involve some modifications on the sources. I gave you an alternative without needing an updated version of C++ anyway Edited August 17, 2022 by xXIntelXx Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now