• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error compiling otx

Jpstafe

Well-Known Member
Joined
Aug 8, 2011
Messages
507
Reaction score
68
hello otland community, i am trying to generate a change to a file, spells.cpp, when i compile the server i copy the exe. to the parent folder and when I open the ot I get an error:
ERROR: Unable to load items (OTB)!
Could it be that I am putting the libraries wrong? use from library first: "tfs-sdk-3.2-otx"
and now try with "tfs-sdk-2.1"
and nothing both generated the same error..

the ot I'm using is this:
 
However, the server does not accept it and ends up giving the error when opening the executable: 'ERROR: Unable to load items (OTB)!'. I don't know if you've already tried to circumvent it to avoid checking the items.otb file and thus being able to open it normally

If there is no change in your items.cpp.

then go to your server's sources, open your items.cpp and look for:
C++:
if(Items::dwMajorVersion == 0xFFFFFFFF)
        std::clog << "[Warning - Items::loadFromOtb] items.otb using generic client version." << std::endl;
    else if(Items::dwMajorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Incorrect version detected, please use official items.otb." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
    else if(!g_config.getBool(ConfigManager::SKIP_ITEMS_VERSION) && Items::dwMinorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Another client version of items.otb is required." << std::endl;
        return ERROR_INVALID_FORMAT;
    }

Now replace all that with this:
C++:
/*if(Items::dwMajorVersion == 0xFFFFFFFF)
        std::clog << "[Warning - Items::loadFromOtb] items.otb using generic client version." << std::endl;
    else if(Items::dwMajorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Incorrect version detected, please use official items.otb." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
    else if(!g_config.getBool(ConfigManager::SKIP_ITEMS_VERSION) && Items::dwMinorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Another client version of items.otb is required." << std::endl;
        return ERROR_INVALID_FORMAT;
    }*/

Now you can use edited items.otb or from other versions.
 
Last edited:
However, the server does not accept it and ends up giving the error when opening the executable: 'ERROR: Unable to load items (OTB)!'. I don't know if you've already tried to circumvent it to avoid checking the items.otb file and thus being able to open it normally

If there is no change in your items.cpp.

then go to your server's sources, open your items.cpp and look for:
C++:
if(Items::dwMajorVersion == 0xFFFFFFFF)
        std::clog << "[Warning - Items::loadFromOtb] items.otb using generic client version." << std::endl;
    else if(Items::dwMajorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Incorrect version detected, please use official items.otb." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
    else if(!g_config.getBool(ConfigManager::SKIP_ITEMS_VERSION) && Items::dwMinorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Another client version of items.otb is required." << std::endl;
        return ERROR_INVALID_FORMAT;
    }

Now replace all that with this:
C++:
/*if(Items::dwMajorVersion == 0xFFFFFFFF)
        std::clog << "[Warning - Items::loadFromOtb] items.otb using generic client version." << std::endl;
    else if(Items::dwMajorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Incorrect version detected, please use official items.otb." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
    else if(!g_config.getBool(ConfigManager::SKIP_ITEMS_VERSION) && Items::dwMinorVersion < CLIENT_VERSION_ITEMS)
    {
        std::clog << "[Error - Items::loadFromOtb] Another client version of items.otb is required." << std::endl;
        return ERROR_INVALID_FORMAT;
    }*/

Now you can use edited items.otb or from other versions.
Thank you for answering me, I have done what you have told me, moreover when I entered items.cpps it was already denied with "/",
I don't understand why when compiling the exe, when I want to make changes I get this items error
 

Attachments

Yes, copy and paste other items.otbs and nothing, until the deletion of a part of the code that you passed me and nothing either, I do not understand why when compiling that item error comes out.
Try using another source without any editing, compile it and open it to check the result.
 
Back
Top