- Joined
- Jul 23, 2005
- Messages
- 329
The error "Uninitialized variable 'Struct method generated initializers/callers: ***************** cape to select." used in IceMoveNow()" appears whenever IceMoveNow() is called. What's strange about the entire thing is that in no case do I ever use a struct, only globals.
That's the code... Can someone explain to me what wc3err is trying to say?
JASS:
function IceMoveNow takes nothing returns nothing
local rect RawrRect
local group RawrGroup = CreateGroup()
local unit RawrUnit
call SetUnitPosition(MovedUnit, GetUnitX(MovedUnit), GetUnitY(MovedUnit) + 50)
set RawrRect = Rect(GetUnitX(MovedUnit) - 128, GetUnitY(MovedUnit) + 128, GetUnitX(MovedUnit) + 128, GetUnitY(MovedUnit) + 128)
call GroupEnumUnitsInRect(RawrGroup, RawrRect, Filter(function boolexprclosest))
set RawrUnit = FirstOfGroup(RawrGroup)
//First: The hit unit
if RawrUnit != null then
call SetUnitState(RawrUnit, UNIT_STATE_LIFE, 10.0)
call UnitAddAbility(RawrUnit, 'A208')
//Second: The unit behind
if GetUnitAbilityLevel(udg_P1Unit, 'A118') >= 2 then
set RawrRect = Rect(GetUnitX(MovedUnit) - 128, GetUnitY(MovedUnit) + 256, GetUnitX(MovedUnit) + 128, GetUnitY(MovedUnit) + 512)
call GroupEnumUnitsInRect(RawrGroup, RawrRect, Filter(function boolexprclosest))
set RawrUnit = FirstOfGroup(RawrGroup)
if RawrUnit != null then
call SetUnitState(RawrUnit, UNIT_STATE_LIFE, 10.0)
call UnitAddAbility(RawrUnit, 'A208')
endif
endif
//Third: The unit to the sides
if GetUnitAbilityLevel(udg_P1Unit, 'A118') == 3 then
//Unit to the left
set RawrRect = Rect(GetUnitX(MovedUnit) - 384, GetUnitY(MovedUnit) - 128, GetUnitX(MovedUnit) - 128, GetUnitY(MovedUnit) + 128)
call GroupEnumUnitsInRect(RawrGroup, RawrRect, Filter(function boolexprclosest))
set RawrUnit = FirstOfGroup(RawrGroup)
if RawrUnit != null then
call SetUnitState(RawrUnit, UNIT_STATE_LIFE, 10.0)
call UnitAddAbility(RawrUnit, 'A208')
endif
//Unit to the right
set RawrRect = Rect(GetUnitX(MovedUnit) + 128, GetUnitY(MovedUnit) - 128, GetUnitX(MovedUnit) - 128, GetUnitY(MovedUnit) + 384)
call GroupEnumUnitsInRect(RawrGroup, RawrRect, Filter(function boolexprclosest))
set RawrUnit = FirstOfGroup(RawrGroup)
if RawrUnit != null then
call SetUnitState(RawrUnit, UNIT_STATE_LIFE, 10.0)
call UnitAddAbility(RawrUnit, 'A208')
endif
endif
call KillUnit(MovedUnit)
call DestroyTimer(GetExpiredTimer())
endif
//Detect if the bullet's gone out of range.
if GetUnitY(MovedUnit) >= GetRectMinY(gg_rct_TopBoundry) then
call KillUnit(MovedUnit)
call DestroyTimer(GetExpiredTimer())
endif
set RawrRect = null
set RawrGroup = null
set RawrUnit = null
endfunction
That's the code... Can someone explain to me what wc3err is trying to say?