[JASS] Problem with the local?

Status
Not open for further replies.
Level 3
Joined
May 2, 2008
Messages
41
I can't figure out what I am doing wrong. I don't think it sets u to Last Created Unit for some reason

JASS:
    local unit u
    set udg_Unit = gg_unit_hfoo_0000
    call CreateUnit(GetOwningPlayer(udg_Unit),GetUnitTypeId(udg_Unit),GetUnitX(udg_Unit),(GetUnitY(udg_Unit) + 600),GetUnitFacing(udg_Unit))
    set u = GetLastCreatedUnit()
    call UnitAddAbilityBJ( 'Aloc', u )
    call SetUnitPositionLoc( GetTriggerUnit(), Location(GetUnitX(udg_Unit), ( GetUnitY(udg_Unit) + 600.00 )) )
    set u = null
 
Level 3
Joined
May 2, 2008
Messages
41
Nevermind

I fixed it. For some reason you can't use GetLastCreatedUnit() with CreateUnit()
 
Status
Not open for further replies.
Top