Jump to content

Problem with drop hack fix


Recommended Posts

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

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.