• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Compile Errors

Status
Not open for further replies.

Intouch

Respected Member
Hello

I added Challenge System which I find on github, but I got some compile errors:

6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(746): error C2653: 'BattlegroundSet' : is not a class or namespace name
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(746): error C2065: 'iterator' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(746): error C2146: syntax error : missing ';' before identifier 'itr'
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(746): error C2065: 'itr' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(746): error C2065: 'next' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(749): error C2065: 'itr' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(749): error C2065: 'm_Battlegrounds' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(749): error C2228: left of '.begin' must have class/struct/union
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(751): error C2065: 'itr' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(751): error C2065: 'm_Battlegrounds' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(751): error C2228: left of '.end' must have class/struct/union
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(752): error C2065: 'itr' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(753): error C2065: 'itr' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(753): error C2065: 'm_Battlegrounds' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(753): error C2228: left of '.end' must have class/struct/union
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(753): error C2065: 'next' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(755): error C2065: 'next' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(755): error C2065: 'itr' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(756): error C2065: 'next' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(757): error C2065: 'itr' : undeclared identifier
6>C:\Users\Desktop\TrinityCore\src\server\game\Battlegrounds\BattlegroundMgr.cpp(757): error C2227: left of '->second' must point to class/struct/union/generic type
6> type is 'unknown-type'


Here is code:
Code:
bool BattlegroundMgr::HasBattleground(Battleground *_bg)
{
    BattlegroundSet::iterator itr, next;
    for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
    {
        itr = m_Battlegrounds[i].begin();
        // skip updating battleground template
        if (itr != m_Battlegrounds[i].end())
            ++itr;
        for (; itr != m_Battlegrounds[i].end(); itr = next)
        {
            next = itr;
            ++next;
            Battleground* bg = itr->second;
            if (bg == _bg)
                return true;
        }
    }

    return false;
}
 

Rochet2

Moderator / Eluna Dev
Why not post the github link?

BattlegroundSet is undefined and is probably either a map or a set of Battlegrounds.
Likely a map seeing the code using it like one..
 
Last edited:
Status
Not open for further replies.
Top