[LUA] Unable to make dynamic filters

Status
Not open for further replies.

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,010
For some reason I can't figure out how to make a dynamic filter/condition so that it can be used for unit enumerations are stuff like that, lua always gives me a vague error "unknown compile error". I've tried endless possibilities and can't wrap my head about it...
Lua:
function A()
    local b = Condition(function AFunction()
    return IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO)
    end)
--blaaaablabla
--(...)
    GroupEnumUnitsInRange(g, someX, someY, 256., b)
end
Either the solution is simple or I'm just overcomplicating it while there is an easier way.
Would be nice to have a documentation about lua on this
 
Status
Not open for further replies.
Top