New to c++

Just wondering if you guys could help me out with a problem I’m having trying to port bots to the new core. For some reason I keep getting this error with their messaging system. I’ve looked all through in Visual Studio Express(Not the greatest IDE).
Anyhoo, here’s the error

3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(554): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(581): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(586): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(1576): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(1587): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3403): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3434): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3449): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3455): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3515): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3540): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3635): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3643): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3651): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3657): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3663): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3688): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3717): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(3727): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(4251): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(4264): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘Language’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(4304): error C2664: ‘void WorldObject::MonsterSay(const char *,uint32,const WorldObject *)’ : cannot convert parameter 3 from ‘uint64’ to ‘const WorldObject *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameAINpcBotsbot_ai.cpp(4314): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘Language’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3> Object.cpp
3> ObjectPosSelector.cpp
3>…TrinityCoresrcservergameEntitiesCreatureCreature.cpp(2806): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameEntitiesCreatureCreature.cpp(2807): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameEntitiesCreatureCreature.cpp(2808): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameEntitiesCreatureCreature.cpp(2809): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>…TrinityCoresrcservergameEntitiesCreatureCreature.cpp(2810): error C2664: ‘void WorldObject::MonsterWhisper(const char *,const Player *,bool)’ : cannot convert parameter 2 from ‘uint64’ to ‘const Player *’
3> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast

http://babablksheep.com/trinityhelp1.png

Credits to the community for the core, it’s great! I built it straight from the github and it compiled/ran like a charm. Just adding these bots would be great as I’m more of a single player type of guy.
I used treetree’s repack from ac webs for the bots, any help would be greatly appreciated! OH ALSO, props to whoever made this ai for them, it looks phenomenol!

Been working on it for hours to no avail. I’ve tried messing with almost every class related to it!

Actually it is the best IDE ever, you just dont know it yet.

Use newer VS : |

The problem is that you are using guid, when the parameter should be player.

Change iTarget->GetGUID() to iTarget->ToPlayer() and it will probably work.

Note that you should check if MonsterWhisper checks that the parameter is NULL. If it doesnt, should check yourself if ToPlayer returns NULL.

Questions about custom code (ie: bots) should be in the custom code subforum.

I would recommend upgrading your VS.

Although I’ve been a heavy Linux user, I would kill to have a IDE for Linux like VS, but unfortunately there is none, so I suffice with CodeBlocks

Why not just use Trickerers patch instead of trying to port a repack version?

http://www.trinitycore.org/f/topic/9460-patch-npc-bots/

— Canned message start —

This thread is not related to the official Trinity codebase and was moved to the Custom Code section.

Please read the stickies next time.

— Canned message end —