What's new

Compile error with trinity core

krazy76

Trial Member
2
2018
0
I'm still new to trinity core and compiling the core. So please keep that in mind lol.

Using:
Trinitycore 3.3.5
Visual Studio 2017
solocraft script

What I am trying to accomplish is to add a script to the build. I have compiled the build with out no custom scripts and it compiled just fine. Now I am trying to add solocraft to the build.
Here is what I have done:

Added the script Solocraft.cpp to to the custom folder.

Added the required code to custom_script_loader.cpp
Code:
// This is where scripts' loading functions should be declared:
void AddSC_solocraft();

// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddCustomScripts()
{
    AddSC_solocraft();
}

I did find I had to add the following to Solocraft.cpp:
Code:
#include "Chat.h"
#include "Log.h"

By adding those I eliminated 2 errors. However, I am still getting the following errors and I'm stumped at the moment.

Error C2039 'HandleStatModifier': is not a member of 'Player' scripts e:\www_server\www\wow255\src\server\scripts\custom e:\www_server\www\wow255\src\server\scripts\custom\solocraft.cpp 82 Build
Error C2039 'getPowerType': is not a member of 'Player' scripts e:\www_server\www\wow255\src\server\scripts\custom e:\www_server\www\wow255\src\server\scripts\custom\solocraft.cpp 85 Build
Error C2039 'HandleStatModifier': is not a member of 'Player' scripts e:\www_server\www\wow255\src\server\scripts\custom e:\www_server\www\wow255\src\server\scripts\custom\solocraft.cpp 101 Build

These errors are all from the solocraft.cpp which displays a hint box that says: class 'Player' has no member 'HandleStatModifier' (same goes with the other 2 errors)... If I am thinking correctly is there someplace I am to define these or is there an updated method for the name "HandleStatModifier" and so on?

Also there is one other error for scripts.lib:
Error LNK1181 cannot open input file '..\scripts\RelWithDebInfo\scripts.lib' worldserver E:\www_Server\www\Build\src\server\worldserver E:\www_Server\www\Build\src\server\worldserver\LINK 1 Build

I have searched the folder for the path it says, but did not see the file there that is being looked for. I've also have tried adding the file manually, but still says the same error. Any assistance with this too would be great. Thanks in advance for any help I can get.
 

krazy76

Trial Member
2
2018
0
I'm not at home right now so can't try the script. Will check it out when I get home tonight. Will let you know if it works. Thanks


EDIT
Finally had time to recompile the core... Everything went smoothly though don't have time to run the server to make sure it runs. I'm sure it will run with no problems. Thanks for the help with this problem. I am sure I'll get the hang of Trinitycore sooner or later.

Just one more question the items that were changed they are pulled from the unit.cpp file correct?
 
Last edited:
Top