PDA

View Full Version : Mod checking


ChaosInc
02-02-2007, 12:30 AM
Building a mod that requires a check/function call of another mod. Havn't been able to do this correctly. Basically, I'm looking for it to check if mod "X" is loaded, and if so call/pass information to a function in mod "X".

Sherkhan
02-02-2007, 04:08 PM
A fairly simple way to do that is:
Say function in mod X is called: FunctionOne_ModX()

Then just do a check to see if the function exists:
ie: if (FuntionOne_ModX) then
tmp = FunctionOne_ModX();
end

OR, if mod "X" has a frame defined in the xml file, ie: ModX_MainFrame
do a check for it:
if (ModX_MainFrame) then
tmp = FunctionOne_ModX();
end

ChaosInc
03-02-2007, 03:33 AM
Ok, got it to recognize if the addon is loaded. Just havn't been able to be able to call the function from the other mod.

ChaosInc
03-02-2007, 05:09 AM
Nevermind, I apparently have been misreading the function's name for the past 2 days. LRN2PAYATTENTION.