trouble making a plugin work

Need help running MacroQuest2? Ask your questions about how to get things to work on your computer.

Moderator: MacroQuest Developers

Chummer
orc pawn
orc pawn
Posts: 24
Joined: Fri Mar 12, 2004 1:58 am

trouble making a plugin work

Post by Chummer » Sun Mar 21, 2004 7:54 pm

I am trying to load a plugin that allows an item exchange without having to open up bags or inventory windows. I have followed the instructions on how to make a new plugin using code from a forum. I added all the files that were created from the mkplugin executable to the mq2main section of the project. I coppied the code on the forum replacing all of the default code that is in the mq2exchangeitem.cpp file. Everything compiles fine, but It wont link and gives the following error which, not being a programmer, I have no idea what it means or how to fix it.
Linking...
MQ2Exchangeitem.obj : error LNK2005: _DllMain@12 already defined in MQ2Main.obj
LINK : fatal error LNK1104: cannot open file "MQ2Main.lib"
Error executing link.exe.

MQ2Main.dll - 2 error(s), 0 warning(s)

And i may be wrong but I also added a line to the eqgame.h file because of the posts instructions:
in eqgame-private.h:
Code:
#define CInvSlotMgr__UpdateSlots 0x004FA784
What am I doing wrong?
Last edited by Chummer on Sun Mar 21, 2004 11:14 pm, edited 1 time in total.

Chummer
orc pawn
orc pawn
Posts: 24
Joined: Fri Mar 12, 2004 1:58 am

Post by Chummer » Sun Mar 21, 2004 8:06 pm

Ok, i got it figured out. I was adding it to the project wrong. Its fixed and working perfectly now! Figures I would figure it out 1 minute after posting here!

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sun Mar 21, 2004 9:22 pm

By the way, this is just a roughly coded plug-in. I didn;t intend to post it here until after I added some error checking to it, and modified some of it, particularly that chain of if statements.

This isn't really the appropriate forum for this either, so would one of the devs either delete it or move it? I will be posting the updated plug-in once I get some things worked out.

Thanks to those who nudged me in the right direction on this by the way.

Chummer
orc pawn
orc pawn
Posts: 24
Joined: Fri Mar 12, 2004 1:58 am

Post by Chummer » Sun Mar 21, 2004 11:14 pm

I didnt post the code for others to use, just for possible debugging. Now that I have it working, it seems to be working fine. I will remove the code from my post tho so you can post it once its finalized.

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 6:46 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 6:48 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 6:49 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 6:50 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 6:51 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 6:52 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 7:29 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 7:30 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 7:32 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 7:33 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: trouble making a plugin work

Post by xyilla » Sun Nov 02, 2025 7:34 am