• 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++ Correct a bit of code

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.
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;
}
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:
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:
Solution
Hm It's strange. there are no "encriptionType, world_id" e.t.c And I don't know which type of encryption is.
I've downloaded from this forum TFS 1.0.

First time I'm doing such a version.

The password should be encrypted, you can only have sha1 on the 1.x series and only 1 world.
So there is no need to have the encryptionType and world_id in the config.lua.

So just make sure the password in the database is encrypted and you should be fine.
Hm It's strange. there are no "encriptionType, world_id" e.t.c And I don't know which type of encryption is.
I've downloaded from this forum TFS 1.0.

First time I'm doing such a version.
 
Hm It's strange. there are no "encriptionType, world_id" e.t.c And I don't know which type of encryption is.
I've downloaded from this forum TFS 1.0.

First time I'm doing such a version.

The password should be encrypted, you can only have sha1 on the 1.x series and only 1 world.
So there is no need to have the encryptionType and world_id in the config.lua.

So just make sure the password in the database is encrypted and you should be fine.
 
Solution
Back
Top