ZhengPeiRu21 / mod-playerbots

AzerothCore Playerbots Module
MIT License
193 stars 92 forks source link

compile error "c2039 getthreatMgr: is not a menmber of 'unit'" #87

Closed wushiwein119 closed 2 years ago

wushiwein119 commented 2 years ago

when i compile the lasted mod-playerbot, vs output some error Severity Code Description Project File Line Suppression State Error C2039 'getThreatMgr': is not a member of 'Unit' modules D:\azerothcore-bot\azerothcore-wotlk-bot\modules\mod-playerbots\src\strategy\actions\MovementActions.cpp 1051
Severity Code Description Project File Line Suppression State Error (active) E0135 class "Unit" has no member "getThreatMgr" modules D:\azerothcore-bot\azerothcore-wotlk-bot\modules\mod-playerbots\src\strategy\actions\MovementActions.cpp 1051
Severity Code Description Project File Line Suppression State Error (active) E2500 a literal operator template must have a template parameter list equivalent to '<char ...>' modules D:\azerothcore-bot\azerothcore-wotlk-bot\deps\fmt\include\fmt\format.h 3030
Severity Code Description Project File Line Suppression State Warning C4715 'Creature::SetCannotReachTarget': not all control paths return a value game D:\azerothcore-bot\azerothcore-wotlk-bot\src\server\game\Entities\Creature\Creature.cpp 3464

how can i deal ?

ZhengPeiRu21 commented 2 years ago

Thank you for notifying of this error. It seems there is some changes to core method signatures; I will fix this in the next day or two!

ZhengPeiRu21 commented 2 years ago

I am not able to reproduce this error. It seems your code has a lowercase "getThreatMgr", but the current master branch is using correct GetThreatMgr. You seem to be using an outdated version of the code. Please update to the latest version. I am going to close this issue, but please comment to re-open if you are still see this problem with latest code.

davidonete commented 2 years ago

This happened to me as well. The playerbot module in the AzerothCore fork (https://github.com/ZhengPeiRu21/azerothcore-wotlk/tree/Playerbot/modules) points to an older version of the module, not sure if intentional, but that version won't compile as stated above. My solution was to remove the folder and redownload latest from this git