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

Solved Storage in C++

Elgenady

Veteran OT User
Joined
Aug 5, 2011
Messages
1,638
Solutions
35
Reaction score
352
its impossible to use storge in cc+??
i try to add this in cc+ but give me this error
Code:
if(reflect)
    {      
        std::string value;
        getStorage(17027, value);

        int32_t tmp = atoi(value.c_str());
        if(tmp && tmp == 1)
            reflected += (int32_t)std::ceil((double)damage / 2.);
    }
but give me this error
Code:
function `virtual BlockType_t Player::blockHit(Creature*, CombatType_t, int32_t&, bool, bool, bool)':
tfs 0.4
 
Last edited:
It's not CC+, it's C++;
You didn't explain what you are trying to achieve;
You didn't post the error, you posted where it is;

Please fix the above because your question is unanswerable
 
0.o yea sorry i'm very busy in work ...
anyway my error when i try to add this cod in player.cpp

Code:
if(reflect)
    {  
        std::string value;
        getStorage(17027, value);

        int32_t tmp = atoi(value.c_str());
        if(tmp && tmp == 1)
            reflected += (int32_t)std::ceil((double)damage / 2.);
    }
in my source give me erro
Code:
function `virtual BlockType_t Player::blockHit(Creature*, CombatType_t, int32_t&, bool, bool, bool)':
player.cpp invalid conversion from `int' to `const char*'
player.cpp   initializing argument 1 of `std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'  
Makefile.win [Build Error]  [obj//player.o] Error 1
 
Last edited:
so sorry guys :D
this is right cod
Code:
if(reflect)
    {
        std::string value;
        getStorage("17027", value);

        int32_t tmp = atoi(value.c_str());
        if(tmp && tmp == 1)
            reflected += (int32_t)std::ceil((double)damage / 2.);
    }
limos i need help from u but in msg please
 
Last edited:
Back
Top Bottom