View Full Version : .lmd Knowhow ? (or not knowhow)
RizlaUK
01-25-2008, 11:45 PM
Hi guys, im wondering what it would take to put a .lmd action plugin together, it would be nice to combine the functions of my dll's in to a single action plugin but i haven any idea where to start
all i need to know really is what software is used (can PureBasic do it ?) and a brief outline as how to go about it
Any help/pointers would be greatly appreciated :yes
RizlaUK
01-26-2008, 03:07 PM
NeverMind, i think i found what i need
http://www.indigorose.com/forums/showthread.php?t=12732
Desolator
01-30-2008, 04:52 PM
If you want to do it, you must make sure you have good knowledge of the Lua API, and PB must be able to call C functions. More, it might not be possible inf PB doesn't have a way to define the types in the Lua API, but I haven't used PB so I have no idea.
There isn't a good reason to make plug-ins expect maybe to accept values with types other than `long', `char*' , and to return values with those types plus `int' (with 32 bits, actually int32). AFAIK with a plug-in you can accept `double' (Lua numbers are internally a double if I'm not mistaken) and Lua tables (got no idea how).
If you don't need those things, then make it a DLL and make a wrapper in Lua and store it in `AMS_DIR\Data\Includes\_error_messages.lua'. (that files gets included in every application, thus it's a good place to add the wrapper).
Eg:
function my_plugin_get_max(a, b)
DLL.CallFunction("bla.dll", "get_max", a .. "," .. b, DLL_RETURN_TYPE_WHATEVER, DLL_CALL_WHATEVER);
end
my_plugin = {};
my_plugin.get_max = my_plugin_get_max;
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.