Jump to content

Whats going wrong with my game?


Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

  • 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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      Target Information System

    2. 1

      Feeding game source to LLM

    3. 2

      anti exp explanation pls

    4. 1

      Feeding game source to LLM

    5. 2

      anti exp explanation pls

    6. 0

      [GR2] Positioning an object added with "Attach"

    7. 1417

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

  • 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.