Hello,
I have a big problem. I have found in creature.cpp two functions:
But when I use this function in this way:
Then the program finds errors
My question is: how to use this function in creature.cpp?
I have a big problem. I have found in creature.cpp two functions:
PHP:
bool Creature::getStorage(const uint32_t key, std::string& value) const
{
StorageMap::const_iterator it = storageMap.find(key);
if(it != storageMap.end())
{
value = it->second;
return true;
}
value = "-1";
return false;
}
bool Creature::setStorage(const uint32_t key, const std::string& value)
{
storageMap[key] = value;
return true;
}
PHP:
target->getAttackedCreature()->getStorage(key, value)
PHP:
C:\Users\Oskar\Desktop\0.3.6pl1.r83\creature.cpp In member function `virtual void Creature::onAttackedCreatureKilled(Creature*)':
1211 C:\Users\Oskar\Desktop\0.3.6pl1.r83\creature.cpp invalid use of member (did you forget the `&' ?)
1211 C:\Users\Oskar\Desktop\0.3.6pl1.r83\creature.cpp base operand of `->' is not a pointer