• 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!

C++ Change Items.otbm Version

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
254
Solutions
3
Reaction score
18
Location
Egypt
i was have some ancient xml source with protocol 7.92 i converted it to 8.10 but there's some problem
i got some error at console says
Code:
:: Loading items.otb... Not supported items.otb version.
Error: Unable to load data/items/items.otb!
here is the required lines of items.cpp
C++:
    if(Items::dwMajorVersion != 8){
        std::cout << "Not supported items.otb version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
 
    if(Items::dwMajorVersion == 0xFFFFFFFF){
        std::cout << "[Warning] Items::loadFromOtb items.otb using generic client version." << std::endl;
    }
    else if(Items::dwMinorVersion != CLIENT_VERSION_810){
        std::cout << "Not supported items.otb client version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
here is the required lines of itemsloader.h
C++:
/////////OTB specific//////////////
enum clientVersion_t{
    CLIENT_VERSION_750 = 1,
    CLIENT_VERSION_755 = 2,
    CLIENT_VERSION_760 = 3,
    CLIENT_VERSION_770 = 3,
    CLIENT_VERSION_780 = 4,
    CLIENT_VERSION_790 = 5,
    CLIENT_VERSION_792 = 6,
    CLIENT_VERSION_800 = 7,
    CLIENT_VERSION_810 = 8
};
i want change the items.otb to 8.10 from my source
 
Last edited:
Making the server accept any items.otb!......

any version that accepts item.otb




C++:
 /*if(Items::dwMajorVersion != 8){
        std::cout << "Not supported items.otb version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }

    if(Items::dwMajorVersion == 0xFFFFFFFF){
        std::cout << "[Warning] Items::loadFromOtb items.otb using generic client version." << std::endl;
    }
    else if(Items::dwMinorVersion != CLIENT_VERSION_810){
        std::cout << "Not supported items.otb client version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }*/

The only change I made in the code is to add the comment tags / * * / so that the server does not check otb.
it says
Code:
:: Loading items.otb... Not supported items.otb client version.


Error: Unable to load data/items/items.otb!
 
Back
Top