GetPet()

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

tonio
a ghoul
a ghoul
Posts: 117
Joined: Fri Apr 02, 2004 12:57 am
Contact:

GetPet()

Post by tonio » Sun May 16, 2004 4:24 pm

With latest ( May 14 2004 19:23:36 ) release, I can't use the "GetPet()" function anymore in plugins... getting:

Code: Select all

error LNK2019: unresolved external symbol __imp__GetPet referenced in function _OnIncomingChat
when trying to build.

MQ2Plugin.h (which is being included) includes MQ2Main.h, which does contain the declaration for GetGet()... so it's really very strange. =/

If I try to add the declaration for GetPet() (PSPAWNINFO GetPet(DWORD ID);) to the cpp file, I get an "inconsistent DLL linkage" error.

Edit: smilies
Tonio

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun May 16, 2004 4:57 pm

People used that crap in plugins? ;)
Here's how you do it....

Code: Select all

PSPAWNINFO pPet=(PSPAWNINFO)GetSpawnByID(pSpawn->pActorInfo->PetID);

enjoy!
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

tonio
a ghoul
a ghoul
Posts: 117
Joined: Fri Apr 02, 2004 12:57 am
Contact:

Post by tonio » Sun May 16, 2004 6:08 pm

Yeah that's basically the code in the GetPet() function, except the function receives OwnerID as an agument, so needs to call GetSpawnByID() first to get the owner spawn...

Anyway, I'm a dumbass, just noticed "#if 0 / #endif" surrounding the code where GetPet() gets defined... silly me. =)
Tonio