[SIZE=18px]EDIT:Managed to work it out myself see bottom of post for the fixed code.[/SIZE]
Hey guys im trying to compile from hkarta’s repo on linux and not getting very far
I have already sorted out a few errors but i seem to be stumped on these two.
first one
Error:
/media/Server/t2/TrinityCore/src/server/game/AI/PlayerBots/PlayerbotAI.cpp:3788:35:
error: cannot pass objects of non-trivially-copyable type ‘const string {aka const struct std::basic_string<char>}’ through ‘...’
make[2]: *** [src/server/game/CMakeFiles/game.dir/AI/PlayerBots/PlayerbotAI.cpp.o] Error 1
Code:
m_bot->UpdateGroundPositionZ(x,y,z);
m_bot->GetMotionMaster()->MovePoint( mapid, x, y, z );
line 3782 //m_bot->SetPosition(x, y, z, m_bot->GetOrientation());
m_bot->SendLoot( m_lootCurrent, LOOT_CORPSE );
Loot *loot = &go->loot;
uint32 lootNum = loot->GetMaxSlotInLootFor( m_bot );
sLog->outString( "[PlayerbotAI]: GetGOType %u - %s looting: '%s Something[needs fixed]' Got %d Items",go->GetGoType(), m_bot->GetName(), go->GetGOInfo()->name, loot->GetMaxSlotInLootFor( m_bot ));
Second one
Error:
/media/Server/t2/TrinityCore/src/server/game/AI/PlayerBots/PlayerbotAI.cpp:3782:17: error: ‘class Player’ has no member named ‘SetPosition
Code is the same from the first one. the code that is commented out
btw only errors if i take out the go->GetGOInfo()->name
Could someone please help me out.
Fix
m_bot->UpdateGroundPositionZ(x,y,z);
m_bot->GetMotionMaster()->MovePoint( mapid, x, y, z );
-m_bot->SetPosition(x, y, z, m_bot->GetOrientation());
+m_bot->UpdatePosition(x, y, z, m_bot->GetOrientation());
m_bot->SendLoot( m_lootCurrent, LOOT_CORPSE );
Loot *loot = &go->loot;
uint32 lootNum = loot->GetMaxSlotInLootFor( m_bot );
sLog->outString( "[PlayerbotAI]: GetGOType %u - %s looting: '%s' Got %d Items",go->GetGoType(), m_bot->GetName(), go->GetGOInfo()->name.c_str(), loot->GetMaxSlotInLootFor( m_bot ));
^Notice the addition of .c_str()