6 registered members (AndrewAMD, Ayumi, degenerate_762, 7th_zorro, VoroneTZ, HoopyDerFrood),
1,268
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
[SOLVED] Issues setting up plugins
#433131
11/25/13 01:36
11/25/13 01:36
|
Joined: Jan 2005
Posts: 330 USA
MatAllum
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2005
Posts: 330
USA
|
I'm relatively new to the use of lite-c (long time c-script user here) and I'm having some issues getting the plugin system to work. I've written a plugin for our team project that allows easy customization of game parameters, but actually getting A8 to recognize it is another story. The manual tells me I can just drop the DLL in the acknex_plugins folder; I've tried that as well as having it directly in the working game folder to no avail. The impression I've gotten is I only need to prototype the DLL functions and they will just work. SED still recognizes dll_open but the manual says I haven't needed it since A6. Below is the sample code; the engine complains on startup that I'm calling an empty function. Am I missing something?
#include <acknex.h>
function registerObjectType(STRING* name, var objectSize);
function registerVariable(STRING* name, var targetObjectType);
function loadConfigData(STRING* name);
function getObjectIndex(STRING* name);
function getDataStructure(var* destination, var type, var index);
function main()
{
registerObjectType("Test", 4);
}
Last edited by MatAllum; 11/26/13 12:52.
|
|
|
Re: Issues setting up plugins
[Re: MatAllum]
#433148
11/25/13 10:21
11/25/13 10:21
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
This part does not help at all, how you define your functions in your DLL code?
3333333333
|
|
|
Re: Issues setting up plugins
[Re: MatAllum]
#433155
11/25/13 13:44
11/25/13 13:44
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
"function" in lite-c defaults to void, your problem might be because of that. Also you need "#define DLL_USE" BEFORE including adll.h
3333333333
|
|
|
Re: Issues setting up plugins
[Re: Quad]
#433176
11/25/13 21:43
11/25/13 21:43
|
Joined: Jan 2005
Posts: 330 USA
MatAllum
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2005
Posts: 330
USA
|
Using var rather than function in the prototype doesn't change it. DLL_USE is in there:
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#define DLL_USE // always define before including adll.h
#include "adll.h"
I don't understand what's going on because I have written plugins for A6 in the past, and they always worked fine. Edit: Okay, I fixed it. I wasn't doing it quite properly when I originally put the DLL in the game folder. It's fine now.
Last edited by MatAllum; 11/26/13 12:51.
|
|
|
|