• 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++ storages [tfs 1.2]

OperatorMopa

Member
Joined
Feb 10, 2014
Messages
127
Reaction score
6
Code:
    int32_t value;
    Player* player = const_cast<Player*>(this);
    std::clog<<player->getStorageValue(9000, value)<<std::endl;

It returns 1, but when i check it ingame it's 3000 (which should be)
 
The function Player::getStorageValue returns a boolean value indicating if it could find that storage key. The value at the storage key 9000 is set to the variable passed as second argument, that is "value" in your code. So you need to output "value" and not what the function returns.
 
Back
Top