scipts errors c++ mangos help menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    scipts errors c++ mangos help

    Trying to fix my battleground in 2.4.3 mangos server, it does not spawn heling and berserking or speed objects in Arathi basin or Eye of Storm.
    Somone knows how to fix these errors?

    4>------ Build started: Project: game, Configuration: Release Win32 ------
    4> BattleGroundAB.cpp
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(161): error C2065: 'm_Bg_Objects' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(426): error C2039: 'setupBattleGround' : is not a member of 'BattleGroundAB'
    4> c:\users\fleetwood\desktop\ny mapp\server\src\game\battleground\BattleGroundAB.h(176) : see declaration of 'BattleGroundAB'
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(431): error C3861: 'AddObject': identifier not found
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(432): error C3861: 'AddObject': identifier not found
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(433): error C3861: 'AddObject': identifier not found
    ========== Build: 3 succeeded, 1 failed, 8 up-to-date, 0 skipped ==========

    scipts errors c++ mangos help
  2. #2
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, you have errors in your code.

    Post your code here, or upload the contents of BattleGroundAB.cpp to pastebin.com (with C++ syntax highlighting pls) and I'll go through it

  3. #3
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I posted it on pastebin, here is the link. [C++] BattleGroundAB C++ - Pastebin.com
    Thansks for looking into it d3rrial

  4. #4
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would you mind also uploading BattleGroundAB.h ?

    One error seems to be that you are describing a method that was never a member of BattleGroundAB

  5. #5
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the link http://pastebin.com/gLRM3vhP
    I give you Eye of Storm to, so you can look into it to if you want ofc.
    [C++] BattleGroundEY.cpp C++ - Pastebin.com
    [C++] BattleGroundEY.h C++ - Pastebin.com

    Thank you

  6. #6
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To fix the first error, go to line 192 in BattleGroundAB.h and add this line:
    Code:
    bool setupBattleGround() override;
    This will fix this error:

    Code:
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(426): error C2039: 'setupBattleGround' : is not a member of 'BattleGroundAB'
    Then there's the problem that "m_Bg_Objects" is never defined anywhere inside the scope of the methods called, so you need to define this somewhere visible, or if its defined out of scope, make it visible (either by supplying it to the methods in their method call parameters or by doing some dodgy public business)

    If its not defined, define the array in BattleGroundAB.h in line 229 (or somewhere around there), keep in mind that then the array also has to be filled with values.

    The last errors (Identifier not found) are appearing because you are using "AddObject" out of context, I am not familiar enough with Mangos to know if these are static methods or member methods, but they are not part of the object you are working in, neither are they defined in this scope. You will probably have to append something to the AddObject calls, like GameObject.AddObject() or something, I don't know which class uses the AddObject method.

    As far as I can tell your basic approach looks correct, you should be able to spawn the buff treasures like this. I'll take a look into some other code, let me know if this helped any.

    Edit:
    Ohhh, I see, you tried to make it work by copying over TrinityCore code...

    This may need some fixing up. Gimme some time.

    Edit2:

    Yup, drop m_Bg_Objects[] completely (except for the stuff between the angled brackets)

    Edit3:

    AddObject() is a member of the class ObjectAccessor in TrinityCore. Look what class its a member off in Mangos

    Edit4:

    Look if you find a file named "ObjectMgr.h". If you do, go into BattleGroundAB.cpp and under the includes put this line:

    Code:
    #include "ObjectMgr.h"
    Last edited by d3rrial; 12-26-2013 at 09:56 AM.

  7. #7
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have these errors after i fixed what you told me to.

    4>------ Build started: Project: game, Configuration: Release Win32 ------
    4> BattleGroundAB.cpp
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(162): error C2337: 'BG_AB_OBJECT_SPEEDBUFF_STABLES' : attribute not found
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(162): error C2143: syntax error : missing ';' before '+'
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(432): error C2660: 'BattleGroundAB::AddObject' : function does not take 11 arguments
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(433): error C2660: 'BattleGroundAB::AddObject' : function does not take 11 arguments
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(434): error C2660: 'BattleGroundAB::AddObject' : function does not take 11 arguments
    ========== Build: 3 succeeded, 1 failed, 8 up-to-date, 0 skipped ==========

  8. #8
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The line (162) should look like this:
    Code:
    SpawnBGObject((BG_AB_OBJECT_SPEEDBUFF_STABLES + buff + i * 3), RESPAWN_IMMEDIATELY);
    I'm looking into the AddObject issue now.+

    Edit:

    Oh I see, I pointed you to the wrong Object management. You can delete that reference now.

    Can you post the contents of the file "BattleGround.h" to pastebin?

    This will have the proper AddObject() syntax.
    Last edited by d3rrial; 12-26-2013 at 06:13 PM.

  9. #9
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okej i will try to se if this works
    here is the link [C++] BattleGroundAB.h - Pastebin.com

  10. #10
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nah, I mean the actual file "BattleGround.h" without the AB.

    Wait, I'll tell you what directory its probably in: /src/server/game/Battlegrounds/Battleground.h

  11. #11
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wonder if you want the originals and se if you can add in the buff objects with respawn and all?

  12. #12
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I could possibly, unfortunately I would have no way to test it and I'm rather busy at the moment, so, sorry, but we have to do it this way. I can add you on skype tho, this may make this quicker.

  13. #13
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okey here is the link [C++] BattleGround.h - Pastebin.com and i pm you my skype name

  14. #14
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go into BattleGround.cpp and add this somewhere towards the end:

    Code:
    bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 /*respawnTime*/)
    {
        // If the assert is called, means that BgObjects must be resized!
        ASSERT(type < BgObjects.size());
    
        Map* map = FindBgMap();
        if (!map)
            return false;
        // Must be created this way, adding to godatamap would add it to the base map of the instance
        // and when loading it (in go::LoadFromDB()), a new guid would be assigned to the object, and a new object would be created
        // So we must create it specific for this instance
        GameObject* go = new GameObject;
        if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, GetBgMap(),
            PHASEMASK_NORMAL, x, y, z, o, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY))
        {
            TC_LOG_ERROR("sql.sql", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
                    entry, m_MapId, m_InstanceID);
            TC_LOG_ERROR("bg.battleground", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
                    entry, m_MapId, m_InstanceID);
            delete go;
            return false;
        }
    
        // Add to world, so it can be later looked up from HashMapHolder
        if (!map->AddToMap(go))
        {
            delete go;
            return false;
        }
        BgObjects[type] = go->GetGUID();
        return true;
    }
    Then go into BattleGround.h and add this

    Code:
    bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 /*respawnTime*/);
    at line 492

    Its entirely possible that this will not work however, these methods may use calls from newer functions and I basically just copied them from TrinityCore
    Last edited by d3rrial; 12-27-2013 at 06:41 AM.

  15. #15
    kallefleetwood123's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehe not the best error list maby, idk maby it is the best we start from scratch? or you can help me later when you are not so bussy, probebly best for you i think.

    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(432): error C2276: '!' : illegal operation on bound member function expression
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(433): error C2059: syntax error : ')'
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(433): error C2660: 'BattleGroundAB::AddObject' : function does not take 11 arguments
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(434): error C2059: syntax error : ')'
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(434): error C2276: '!' : illegal operation on bound member function expression
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(434): error C2146: syntax error : missing ';' before identifier 'BG_AB_OBJECT_SPEEDBUFF_STABLES'
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(434): error C2059: syntax error : ')'
    4>..\..\src\game\BattleGround\BattleGroundAB.cpp(436): error C2143: syntax error : missing ';' before 'MaNGOS::Singleton<T>::Instance'
    4> with
    4> [
    4> T=Log
    4> ]
    4> BattleGroundHandler.cpp
    4> BattleGroundMgr.cpp
    4> BattleGroundNA.cpp
    4>..\..\src\game\BattleGround\BattleGround.cpp(1653): error C2653: 'Battleground' : is not a class or namespace name
    4>..\..\src\game\BattleGround\BattleGround.cpp(1656): error C2065: 'BgObjects' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGround.cpp(1656): error C2228: left of '.size' must have class/struct/union
    4> type is ''unknown-type''
    4>..\..\src\game\BattleGround\BattleGround.cpp(1656): error C3861: 'ASSERT': identifier not found
    4>..\..\src\game\BattleGround\BattleGround.cpp(165: error C3861: 'FindBgMap': identifier not found
    4>..\..\src\game\BattleGround\BattleGround.cpp(1665): error C2819: type 'ObjectMgr' does not have an overloaded member 'operator ->'
    4> C:\Users\Fleetwood\Desktop\Ny mapp\server\src\game\ObjectMgr.h(451) : see declaration of 'ObjectMgr'
    4> did you intend to use '.' instead?
    4>..\..\src\game\BattleGround\BattleGround.cpp(1665): error C2039: 'GenerateLowGuid' : is not a member of 'ObjectMgr'
    4> C:\Users\Fleetwood\Desktop\Ny mapp\server\src\game\ObjectMgr.h(451) : see declaration of 'ObjectMgr'
    4>..\..\src\game\BattleGround\BattleGround.cpp(1666): error C2065: 'PHASEMASK_NORMAL' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGround.cpp(1665): error C3861: 'GetBgMap': identifier not found
    4>..\..\src\game\BattleGround\BattleGround.cpp(1669): error C2065: 'm_MapId' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGround.cpp(1669): error C2065: 'm_InstanceID' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGround.cpp(166: error C3861: 'TC_LOG_ERROR': identifier not found
    4>..\..\src\game\BattleGround\BattleGround.cpp(1671): error C2065: 'm_MapId' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGround.cpp(1671): error C2065: 'm_InstanceID' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGround.cpp(1670): error C3861: 'TC_LOG_ERROR': identifier not found
    4>..\..\src\game\BattleGround\BattleGround.cpp(1677): error C2039: 'AddToMap' : is not a member of 'Map'
    4> c:\users\fleetwood\desktop\ny mapp\server\src\game\Map.h(9 : see declaration of 'Map'
    4>..\..\src\game\BattleGround\BattleGround.cpp(1682): error C2065: 'BgObjects' : undeclared identifier
    4>..\..\src\game\BattleGround\BattleGround.cpp(1682): error C2039: 'GetGUID' : is not a member of 'GameObject'
    4> c:\users\fleetwood\desktop\ny mapp\server\src\game\GameObject.h(566) : see declaration of 'GameObject'

Page 1 of 2 12 LastLast

Similar Threads

  1. ArcEmu Help Error And Mangos Error
    By InvaderGir in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 03-30-2009, 08:19 AM
  2. Ascent/LogOnServer/MySQL - Error message - Need help!
    By Habakka in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-21-2008, 12:56 PM
  3. MaNGOS Help
    By freeza888 in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 12-29-2007, 03:01 PM
  4. AC-WEB error, cant launch -HELP-
    By Ryanmax59 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 12-05-2007, 10:32 PM
  5. Mangos Help
    By hoboonaparkbench in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 09-01-2007, 04:32 AM
All times are GMT -5. The time now is 02:51 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search