danio475 6 Posted April 22, 2017 Share Posted April 22, 2017 Hi I try to fix party drophack in my source, but I have some problems : char_item.cpp:5644: error: ISO C++ forbids initialization of member 'is_allowed' char_item.cpp:5644: error: making 'is_allowed' static char_item.cpp:5644: error: ISO C++ forbids in-class initialization of non-const static member 'is_allowed' this is the code : namespace NPartyPickupPermission { struct FCompareOwnership { LPITEM item; bool is_allowed = false; FCompareOwnership(LPITEM item) : item(item) { } void operator () (LPCHARACTER ch) { if (item->IsOwnership(ch) == true) is_allowed = true; } }; } bool is_allowed = false; is a line 5644, any ideas what I did wrong? any ideas to fix/ Link to comment Share on other sites More sharing options...
danio475 6 Posted April 23, 2017 Author Share Posted April 23, 2017 @bump still not solved :/ Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted April 23, 2017 Premium Share Posted April 23, 2017 Hi, Try to replace with : bool is_allowed; 1 Link to comment Share on other sites More sharing options...
danio475 6 Posted April 23, 2017 Author Share Posted April 23, 2017 it works, thanks 1 Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted April 23, 2017 Premium Share Posted April 23, 2017 You're welcome ! Don't forget to mark your question as solved c: 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