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

TrinityCore 3.3.5 Randomly poped up errors after compile

Vitrex

Moderator
Hello, Emudevs, addicts ...
i edited ObjectMgr.cpp changed stuff here

Code:
levelInfo.basehealth = fields[2].GetUInt16();
levelInfo.basemana   = fields[3].GetUInt16();

to

Code:
levelInfo.basehealth = fields[2].GetUInt32();
levelInfo.basemana   = fields[3].GetUInt32();

and after recompile, randomly from nowhere these errors showed up.
Code:
11>  gamePCH.cpp
11>D:\Core\src\common\Utilities\EventProcessor.h(29): error C2143: syntax error : missing ';' before '<class-head>'
11>D:\Core\src\common\Utilities\EventProcessor.h(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>D:\Core\src\server\game\Entities\GameObject\GameObject.h(29): error C2144: syntax error : 'GameObjectAI' should be preceded by ';'
11>D:\Core\src\server\game\Entities\GameObject\GameObject.h(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>D:\Core\src\server\game\Entities\GameObject\GameObject.h(29): error C2086: 'int c' : redefinition
11>          D:\Core\src\common\Utilities\EventProcessor.h(28) : see declaration of 'c'
========== Rebuild All: 10 succeeded, 1 failed, 0 skipped ==========

i said ok lets check why.
GameObject.h (29 line is)

Code:
class GameObjectAI;

And EventPRocessor.h

Code:
#include "Define.h"


#include <map>


// Note. All times are in milliseconds here.


class TC_COMMON_API BasicEvent
{
    public:
        BasicEvent()
        {
            to_Abort = false;
            m_addTime = 0;
            m_execTime = 0;
        }
        virtual ~BasicEvent() { }                           // override destructor to perform some actions on event removal


        // this method executes when the event is triggered
        // return false if event does not want to be deleted
        // e_time is execution time, p_time is update interval
        virtual bool Execute(uint64 /*e_time*/, uint32 /*p_time*/) { return true; }

line 29 is

Code:
{

What the hell guys? Why how and WHEN?
Basically first thing i did i went to tc core and copy pasted those files from source. and guess what same...
 
Last edited:

Sylica

Exalted Member
Vitrex, what version compiler are you using to compile your source?
Code:
Note: C++ does not support default-int
Might be related in a way
 

Vitrex

Moderator
2013 Update 5. i recompiled fresh core and fixed everything that way, but still curious how that happens. they came from nowhere. as i was able to recompile from fresh TC that shows compiler wasn't and issue. it's good that i've done minor changes before, but what to do when i'll have more a lot more changes and this happens?
 

slp13at420

Mad Scientist
but what to do when i'll have more a lot more changes and this happens?

I would roll back my changes to the last point I knew it would compile clean, and yea it sux doing it this way but I would then add each edit 1 at a time and compile after each to see where it exactly starts to toss err's at me.
 

Tommy

Founder
Are you sure that's all the changes you did? The code you gave doesn't make sense to the errors being thrown. Where is "int c"? Is there more you can paste us?
 

Vitrex

Moderator
that's the places where it throws and errors. i mean in log it says that files (Lines). and yes that was all the changes i did and that not first time. i remember like 2 times after recompile i got strange random errors.
 
Top