Frozenhelfir
set Gwypaas = Guhveepaws
- Reaction score
- 56
Fixed the main issue, but charges aren't being added.
The BJDebug shows up whenever the said units are constructed, but the item isn't added. What would be a solution?
The BJDebug shows up whenever the said units are constructed, but the item isn't added. What would be a solution?
JASS:
private function ConstructCond takes nothing returns nothing
local integer h = GetUnitTypeId(GetConstructedStructure())
local integer i = 0
local item vGem
//local boolean b = false
local unit u = GetConstructedStructure()
loop
if h == GEM<i>[3] then
call BJDebugMsg("if h == GEM<i>[3] true")
set vGem = UnitAddItemById(u, GEM<i>[3])
call SetItemCharges(vGem, 1)
endif
exitwhen i >= 12
set i = i+1
endloop
endfunction</i></i></i>