C++ Change Items.otbm Version

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
248
Best answers
3
Reaction score
6
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:

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
565
Best answers
10
Reaction score
65
The first line in the code above:

!= 8

This is wrong.

Put the whole name. CLIENT_VERSION_810
 
OP
Na Amigo

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
248
Best answers
3
Reaction score
6
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();
       
        }
    
        }
 
OP
Na Amigo

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
248
Best answers
3
Reaction score
6
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();
        }
 

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
565
Best answers
10
Reaction score
65
You cannot put there a number.

But which version do you have? (items.otbm)
 

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
565
Best answers
10
Reaction score
65
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.
 
OP
Na Amigo

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
248
Best answers
3
Reaction score
6
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
 

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
565
Best answers
10
Reaction score
65
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
 
OP
Na Amigo

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
248
Best answers
3
Reaction score
6
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
it's already 8.10
 

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
565
Best answers
10
Reaction score
65
so it's something with sources.
but when you made changes, have you compiled it then?
 
OP
Na Amigo

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
248
Best answers
3
Reaction score
6
so it's something with sources.
but when you made changes, have you compiled it then?
yeah it's working fine the source is 7.92 i'm trying to change it to 8.10
 

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
565
Best answers
10
Reaction score
65
but if you make any changes in sources you must for every time compile it and use the new engine
 
OP
Na Amigo

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
248
Best answers
3
Reaction score
6
but if you make any changes in sources you must for every time compile it and use the new engine
yeah the i made new engine but it's not support the items why?
the compile working fine man
 

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
565
Best answers
10
Reaction score
65
really I dont know... you can always remove the whole part in sources and feel free
 
Top