• 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:
The first line in the code above:

!= 8

This is wrong.

Put the whole name. CLIENT_VERSION_810
i've used this but it does not work
C++:
 if(Items::dwMajorVersion != CLIENT_VERSION_810){
        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;
    }
   
    node = f.getChildNode(node, type);

    while(node != NO_NODE){
        PropStream props;
        if(!f.getProps(node,props)){
            return f.getError();
       
        }
    
        }
 
and this too doesn't work
C++:
if(Items::dwMajorVersion != 2){
        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;
    }

    node = f.getChildNode(node, type);

    while(node != NO_NODE){
        PropStream props;
        if(!f.getProps(node,props)){
            return f.getError();
        }
 
in resources.h try this:
C++:
#define CLIENT_VERSION_MIN 810
#define CLIENT_VERSION_MAX 810

Or items.otb isn't 810 version. Open up it by ItemEditor and check what there will print.
 
in resources.h try this:
C++:
#define CLIENT_VERSION_MIN 810
#define CLIENT_VERSION_MAX 810

Or items.otb isn't 810 version. Open up it by ItemEditor and check what there will print.
i don't have resource.h but i have some file like it's name otserv.cpp
and i said before i'm using xml server not sql
 
Ok so to make sure this is 810 open up items.otb and look what there will print when it'll load itself.

coz it's the clearest problem
 
Back
Top