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

Compiling Problem with getStorage/setStorage in C++

whiteblXK

Active Member
Joined
Apr 20, 2011
Messages
315
Solutions
9
Reaction score
32
Location
Poland
Hello, I wrote a short code in C ++ and I have a problem with it.
Code:
std::string strValue;
int32_t value = 1;
if(player->getStorage(uint32_t(6000 + player->getVocationId()), strValue) && atoi(strValue.c_str()) != value)
{
    changeMaxHealth(uint32_t(getMaxHealth() + vocation->getBonusHP()));
    changeMaxMana(uint32_t(getMaxMana() + vocation->getBonusMP()));
    player->setStorage(uint32_t(6000 + player->getVocationId()), strValue);
}


When I use this code in my function player and server(TFS 0.3.6) get big lags. How I should use getStorage and setStorage to work properly?
 
Back
Top