Jass HELP please
What should I do for get this working
Putted into map header and I recive error
JASS:
function ablecheck1 takes unit attacker2 returns boolean
if ( not ( IsUnitEnemy(attacker2, GetOwningPlayer(GetEnumUnit())) == true ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function damagefunc1 takes unit attacker1,real damage1 returns nothing
if ( ablecheck1(attacker1) ) then
call UnitDamageTargetBJ( attacker1, GetEnumUnit(), damage1, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function damagearea takes unit attacker,location point,real area,real damage returns nothing
call ForGroupBJ( GetUnitsInRectAll(RectFromCenterSizeBJ(point, area, area)), function damagefunc1(attacker,damage) )
endfunction
What should I do for get this working
Putted into map header and I recive error