Welcome to AC Web.
Results 1 to 10 of 10
  1. #1

    Need help adding scripts to my servers before compliling them.


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Hey guys,

    Alright. What a ride it has been messing around with WOW private servers. First i begin playing on official Private Servers, then adventured on to downloading repacks and now here i am, trying to complie my own private server. Over the last couple days, i learned how to actually install all the required software, grab all the files and actually build a working 3.3.5a private server. I could create accounts, log in, and play all by myself. It was a great feeling to learn it all, have error after error and figuring out how to successfully build a server.

    While messing around with repacks, some of them would have additional scripts added to them to enhance the server. I want to start to implement some of these features / scripts in with my server as well. The first one i wanted to implement was "SoloCraft". I headed to the github website, grabbed the code, and followed this guide (link to guide)


    I did this before running CMAKE, and making sure within CMAKE i had custom scripts set to Custom. After following the guide, running CMAKE and build the code in Visual Studio, i had errors after building it.

    Is there an updated guide / video to watch to show me how to successful add a script to the build? Am i doing this right at all? Thanks for any information.

  2. #2
    Most likely you have to update the SoloCraft script.

  3. #3
    Post the errors you are getting so we have a better understanding.

  4. #4
    Thank guys for taking the time in looking at this.

    So while at work and pondering over this, i started to think about a different way in tackling this. My first thought was to try a different script. Maybe the Solocraft script is old, corrupted, whatever. I grabbed one from this site and implement it into CMAKE.

    I grabbed a basic script Anti-duel-Boxing script

    THis is what i get when compiling the above script.
    https://pastebin.com/TRSun164



    Solocraft Updated :

    This is what i get when compiling Solocraft
    https://pastebin.com/cgjZXqhT


    Both scripts are saved as .cpp files, been added to my custom_script_loader.cpp file, one at a time, and put files are located in "\Source\TrinityCore\src\server\scripts\Custom ".

    I do wonder if the scripts need to be in a Folder within the Custom folder? Does Script_Custom need to be set to Static in CMAKE?

    Thanks
    Last edited by eighthour; 03-13-2018 at 12:31 AM. Reason: editing

  5. #5
    For Anti-duel-Boxing script looks like you messed up something in your custom_script_loader.cpp file.
    Can you post your custom_script_loader.cpp on pastebin as well?

    As for the solocraft script, you have to update it and fix those errors.

    Code:
    19>solocraft.cpp
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(23): error C3861: 'TC_LOG_INFO': identifier not found
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(27): error C3861: 'ChatHandler': identifier not found
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(27): error C2228: left of '.SendSysMessage' must have class/struct/union
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(27): note: type is 'unknown-type'
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(74): error C3861: 'ChatHandler': identifier not found
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(74): error C2228: left of '.PSendSysMessage' must have class/struct/union
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(74): note: type is 'unknown-type'
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(82): error C2039: 'getPowerType': is not a member of 'Player'
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(94): error C3861: 'ChatHandler': identifier not found
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(94): error C2228: left of '.PSendSysMessage' must have class/struct/union
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(94): note: type is 'unknown-type'
    19>f:\wow server files\trinity core files\personal server 3.3.5a\source\trinitycore\src\server\scripts\custom\solocraft.cpp(106): fatal error C1075: '{': no matching token found
    For the error C3861: 'ChatHandler': identifier not found you must #include "Chat.h"

    For error C3861: 'TC_LOG_INFO': identifier not found I guess you need to include "Log.h"
    Last edited by mindsear; 03-13-2018 at 01:08 AM.

  6. #6
    For the solocraft script, this is my custom_script_loader.cpp
    Solocraft

    For Anti-duel-Boxing, this is my custom_script_loader.cpp
    Anti-duel-Boxing
    The script is locally named "player". I dont know if it needs to be named something else?

  7. #7
    It doesn't matter how you name your script file. What it does matter is how you add it to custom_script_loader.cpp

    For example in Anti-duel boxing at the end you can see this
    Code:
    void AddSC_player_session_checks()
    {
        new multi_login_check;
    }
    So you must copy AddSC_player_session_checks() and add it like that to custom_script_loader.cpp
    It didn't work because you added AddSC_player()

  8. #8
    I have cleaned up both scripts files and now they are both getting me the same error after compiling them.

    Solocraft Error List

    Anti-duel boxing Error List

    Looks like both errors are refereeing to "LINK : fatal error LNK1181: cannot open input file '..\scripts\Release\scripts.lib'"

    Thanks again for taking some time to help me out.

  9. #9
    The solocraft script with that errors that you have shown seems to be outdated.
    "error C2039: 'getPowerType': is not a member of 'Player" for example means that the function has not been found.
    There are two simple / possible explainations:
    - getPowerType has been renamed over time (for example to GetPowerType) and yes, this can and will cause errors,
    - getPowerType does simply not exist for the player class.

    "'ChatHandler': identifier not found " on the other side means that the ChatHandler class has not been found so you need to tell the compiler that it does. From a quick lookup you probably need to use #include "Chat.h" at the top of the code to tell the compiler from where you have that class.

    "error C1075: '{': no matching token found" this one here might disappear once you solved the other issues but otherwise you might have a incomplete bracket case. each { ends with a }

  10. #10

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    It doesn't matter how you name your script file. What it does matter is how you add it to custom_script_loader.cpp

    For example in Anti-duel boxing at the end you can see this
    Code:

    void AddSC_player_session_checks()
    {
    new multi_login_check;
    }

    So you must copy AddSC_player_session_checks() and add it like that to custom_script_loader.cpp
    It didn't work because you added AddSC_player()
    Thanks for explaining this. I went back and am starting to make the path of how the scripting works in these build.



    The solocraft script with that errors that you have shown seems to be outdated.
    "error C2039: 'getPowerType': is not a member of 'Player" for example means that the function has not been found.
    There are two simple / possible explainations:
    - getPowerType has been renamed over time (for example to GetPowerType) and yes, this can and will cause errors,
    - getPowerType does simply not exist for the player class.

    "'ChatHandler': identifier not found " on the other side means that the ChatHandler class has not been found so you need to tell the compiler that it does. From a quick lookup you probably need to use #include "Chat.h" at the top of the code to tell the compiler from where you have that class.

    "error C1075: '{': no matching token found" this one here might disappear once you solved the other issues but otherwise you might have a incomplete bracket case. each { ends with a }
    The solocraft script that im trying to make work is from the actual GitHub website. Is there a newer version of the script elsewhere. Trying to get it work for my 3.3.5 server.

    I have updated both scripts to effect these errors and now all im dealing with is the infamous LNK1181 error.

    - - - Updated - - -

    Here is the CMAKE setup that im using. In case anyone wants to take a look at it. I believe i want to say LNK1181 compile error refers to a CMAKE install error.

    CMAKE 1
    CMAKE 2

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •