Hello ,I'm not very familiar with this forum, and I just started to learn JASS,
I'm constantly getting this error, for example: how do I fix this error
I'm constantly getting this error, for example: how do I fix this error
Code:
function Heal takes nothing returns nothing
// this example will heal all units in a unit group.
local unit u
loop
set u = FirstOfGroup(udg_g) //Selects the first unit in the group.
exitwhen u == null
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
call GroupRemoveUnit(udg_g, u) // removes the unit from the group
endloop
call DestroyGroup(udg_g) // to avoid group leaks, we must destroy the group variable.
endfunction
Code:
call Heal(udg_g)