Jump to content
  • 0

Whats going wrong with my game?


sylwek219awp

Question

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0
31 minut temu, Shelby napisał:

add the file.cpp in your makefile

i think ` ItemShopManager`

Ok bro ! true :)

 

But after this on my bsd i have other problem

 

itemshop_manager.cpp: In member function 'void CItemShopManager::BuyItem(CHARACTER*, DWORD, DWORD)':
itemshop_manager.cpp:133: warning: comparison between signed and unsigned integer expressions
itemshop_manager.cpp: In member function 'bool CItemShopManager::IsEditor(CHARACTER*)':
itemshop_manager.cpp:279: error: ISO C++ forbids declaration of 'it' with no type
itemshop_manager.cpp:279: error: cannot convert '__gnu_cxx::__normal_iterator<char**, std::vector<char*, std::allocator<char*> > >' to 'int' in initialization
itemshop_manager.cpp:279: error: no match for 'operator!=' in 'it != ((CItemShopManager*)this)->CItemShopManager::m_vec_pkEditors.std::vector<_Tp, _Alloc>::end [with _Tp = char*, _Alloc = std::allocator<char*>]()'
affect_flag.h:64: note: candidates are: bool operator!=(const TAffectFlag&, const TAffectFlag&)
itemshop_manager.cpp:281: error: invalid type argument of 'unary *'
gmake: *** [OBJDIR/itemshop_manager.o] Error 1

 

 

 

And hier u have this function:

 

void CItemShopManager::AddEditor(char* szName)
{
    m_vec_pkEditors.push_back(szName);
}

bool CItemShopManager::IsEditor(LPCHARACTER ch)
{
    for (auto it = m_vec_pkEditors.begin(); it!= m_vec_pkEditors.end(); ++it )
    {
        char* szEditorName = *(it);

        if (strcmp(ch->GetName(), szEditorName) == 0)
            return true;

    }

    return false;
}

Link to comment
Share on other sites

  • 0
  • Premium

what compiler?

try

Spoiler
 bool CItemShopManager::IsEditor(LPCHARACTER ch)
{
    for (itertype(m_vec_pkEditors) it = m_vec_pkEditors.begin(); it!= m_vec_pkEditors.end(); ++it )
    {
        char* szEditorName = *(it);

        if (strcmp(ch->GetName(), szEditorName) == 0)
            return true;

    }

    return false;
} 

 

 

Link to comment
Share on other sites

  • 0
13 godzin temu, Shelby napisał:

what compiler?

try

  Odkryj ukrytą treść

 bool CItemShopManager::IsEditor(LPCHARACTER ch)
{
    for (itertype(m_vec_pkEditors) it = m_vec_pkEditors.begin(); it!= m_vec_pkEditors.end(); ++it )
    {
        char* szEditorName = *(it);

        if (strcmp(ch->GetName(), szEditorName) == 0)
            return true;

    }

    return false;
} 

 

 

Huge +++++++ for this gentelman :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 7

      Metin2 2003 Beta Client!!!!!

    2. 32

      Boss Effect Over Head

    3. 0

      Open Source API for Metin2 Server Management - Early Development

    4. 0

      Official Item Combination [18.4]

    5. 2

      Proper SIGNAL management for Windows

    6. 2

      Proper SIGNAL management for Windows

    7. 4

      syserr erorr ( not working OK button on client )

    8. 2

      Proper SIGNAL management for Windows

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.