jestem pro
That is the question
- Joined
- Apr 20, 2013
- Messages
- 650
- Solutions
- 14
- Reaction score
- 87
Hi.
I'm not good at C++ and I don't know how it fix.
I'm trying to replace mount system from 9.80 to 8.6, but I have one problem.
And the error:
In member function `bool Player::tameMount(uint8_t)':
`asStorage' was not declared in this scope
@Edit
I got it.. something just like this:
Sorry for refresh but I have already one problem. I added new files mounts.h and mounts.cpp, but linker has fucking errors....
When I added the files .h and .cpp, should I add something else for example mounts.o ??? or others
I'm not good at C++ and I don't know how it fix.
I'm trying to replace mount system from 9.80 to 8.6, but I have one problem.
Code:
bool Player::tameMount(uint8_t mountId)
{
if(!Mounts::getInstance()->getMountById(mountId))
return false;
--mountId;
int32_t key = PSTRG_MOUNTS_RANGE_START + (mountId / 31), value = 0;
std::string tmp;
if(getStorage(key, tmp))
{
value = atoi(tmp.c_str());
value |= (int32_t)pow(2., mountId % 31);
}
else
value = (int32_t)pow(2., mountId % 31);
setStorage(key, asStorage(value));
return true;
}
In member function `bool Player::tameMount(uint8_t)':
`asStorage' was not declared in this scope
@Edit
I got it.. something just like this:
Code:
setStorage(key, (const char*)value);
Sorry for refresh but I have already one problem. I added new files mounts.h and mounts.cpp, but linker has fucking errors....
When I added the files .h and .cpp, should I add something else for example mounts.o ??? or others
Last edited by a moderator: