When i use that as a macro it works without problems :/
Try
Code: Select all
/script curD,maxD,itemName,curDfull,maxDfull = GetInventoryItemDurable("player", 15)
/script DEFAULT_CHAT_FRAME:AddMessage(curD)
I want to use that in MicroMacro.
So i did this :
Code: Select all
<!-- # 1 --><waypoint x="-11675" z="-2596">
GetDurability()
</waypoint>
Code: Select all
function GetDurability()
local curD,maxD,itemName,curDfull,maxDfull = GetInventoryItemDurable("player", 15)
local percentD = math.ceil((curD/maxD)*1000)/10
printf("Wapon 1 Durability = ");
printf(percentD);
if( percentD <= 50 ) then
load_paths( "repair.xml");
end
end;
I get this error : scripts\rom\functions.lua attempt to call global "GetInventoryItemDurable" <a nil value>