Page 1 of 4

trouble making a plugin work

Posted: Sun Mar 21, 2004 7:54 pm
by Chummer
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?

Posted: Sun Mar 21, 2004 8:06 pm
by Chummer
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!

Posted: Sun Mar 21, 2004 9:22 pm
by wassup
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.

Posted: Sun Mar 21, 2004 11:14 pm
by Chummer
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.

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 6:46 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 6:48 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 6:49 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 6:50 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 6:51 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 6:52 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 7:29 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 7:30 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 7:32 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 7:33 am
by xyilla

Re: trouble making a plugin work

Posted: Sun Nov 02, 2025 7:34 am
by xyilla