Now I might be a total noob, but I can't find the solution in the thread. The problem is really weird. I can pick up inventory item 1 and use it on inventory item 2 if the code is as follows:
[code]function iChain_UseInv()
{
cEgo.LoseInventory(iRope);
cEgo.LoseInventory(iChain);
cEgo.AddInventory(iDevice);
cEgo.Say("It worked!");
}[/code]
But since this makes every inventory item transfer the iRope and the iChain to a iDevice, I want to do it like this:
[code]function iChain_UseInv()
{
if (cEgo.ActiveInventory == iRope) {
cEgo.LoseInventory(iRope);
cEgo.LoseInventory(iChain);
cEgo.AddInventory(iDevice);
cEgo.Say("It worked!");
}
else {
cEgo.Say("There is no point in using that on that.");
}
}[/code]
and this:
[code]function iRope_UseInv()
{
if (cEgo.ActiveInventory == iChain) {
cEgo.LoseInventory(iRope);
cEgo.LoseInventory(iChain);
cEgo.AddInventory(iDevice);
cEgo.Say("It worked!");
}
else
cEgo.Say("No.");
}[/code]
But then it jumps straight to the else function and says "No" or "There is no point...". It's as if the mouse actions in the inventory suddenly are allergic to "if's"! Now this might be completely unrelated to the module, but it worked fine before I added it (via function on_mouse_click, BASSFunctions etc.). If its unrelated I am sorry I bothered you!
