i have this function used for a boolexpr that does this:
however, jasshelper always tells me i have a missing return at the last line of the endfunction. is it true that the return must always be at the bottom? and if it needs to be, how can i remove the locations after use then?
JASS:
private function lockcond takes nothing returns boolean
local location compareloc1 = GetUnitLoc(MissleDummy)
local location compareloc2 = GetUnitLoc(GetFilterUnit())
return(IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) and ((GetUnitFacing(MissleDummy) - 90) <= AngleBetweenPoints(compareloc1, compareloc2) and (GetUnitFacing(MissleDummy) + 90) >= AngleBetweenPoints(compareloc1, compareloc2)))
call RemoveLocation(compareloc1)
call RemoveLocation(compareloc2)
endfunction
however, jasshelper always tells me i have a missing return at the last line of the endfunction. is it true that the return must always be at the bottom? and if it needs to be, how can i remove the locations after use then?