ExpansionAttack

comment
bug

Leaks handle creep: In Jass you must set local variables that hold handles (or any child type) to null at the end of functions to avoid leaks.

patch

1.00

Source
common.ai (raise an issue to discuss on Github or submit a PR)
return type
nothing
Source code
function ExpansionAttack takes nothing returns nothing
    local unit creep = GetExpansionFoe()
    local integer x

    call FormGroup(3, true)
    if creep == null then
        set x = GetExpansionX()
        if x != -1 then
            call AttackMoveXYA(x,GetExpansionY())
        endif
    else
        call AttackMoveKillA(creep)
    endif
endfunction