shiFt
Member
- Reaction score
- 8
Trying to remove one item them replace it with another, Eg: greenitem gets replaced with blueitem in same slot, however its not working.
JASS:
private function Actions takes nothing returns nothing
local unit d = GetTriggerUnit()
local integer i = GetInventoryIndexOfItemTypeBJ( d, GREENITEM)
call BJDebugMsg(I2S(i))
call UnitRemoveItemFromSlot(d, i )
call UnitAddItemToSlotById(d,BLUEITEM, i)
set d = null
endfunction