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

setStorage problem

Elgenady

Veteran OT User
Joined
Aug 5, 2011
Messages
1,637
Solutions
35
Reaction score
351
i use this code
Code:
setStorage(boost::lexical_cast<std::string>("15226"), boost::lexical_cast<std::string>(lobaty));
Code:
setStorage(boost::lexical_cast<std::string>("15226"), boost::lexical_cast<std::string>((lobaty- 1)));

but i got this error
no matching function for call to `Player::setStorage(std::string, std::string)'

candidates are: virtual bool Player::setStorage(uint32_t, const std::string&)

tfs 0.4
anyone know why??
i use this code in other source and work fine
 
Last edited:
setStorage expects (number, string), not (string, string)
you're converting 15226 to a string so the result is (string, string)
just use setStorage(15226, <lexical cast here>)
 
Back
Top