Ok im making a spell that a unit called Spore Beast does something like spore nova-spawns 8 spores and they travel in 8 directions.I havent made the damage yet,but ill make it later.The problem is my function is giving me error:
The error is at .Im basicly trying to do: Pick units in the unit group spores,but i started doing jass 1 day ago and im still having trouble figuring out how things are done.Thanks in advance.
JASS:
function SporeBurstAbi takes unit caster returns nothing
local location temp_point = GetUnitLoc(caster)
local location temp_point2 = null
local integer i = 0
local group spores = null
local real degrees = 0.0
loop
exitwhen( i == 8 )
call CreateUnitAtLoc( Player( GetUnitCurrentOrder ( caster ) ),039;sbdu039;,temp_point,260.0)
call GroupAddUnit( spores,GetLastCreatedUnit( ) )
call SetUnitFacingTimed( GetLastCreatedUnit( ),degrees,0 )
set degrees = degrees + 45.0
set i = i + 1
endloop
set i = 0
loop
exitwhen(i == 100)
call ForGroup( spores,function SporeBurstAbi )
set temp_point = GetUnitLoc(GetEnumUnit())
set temp_point2 = PolarProjectionBJ( temp_point,5.0,GetUnitFacing( GetEnumUnit( ) ) )
call SetUnitPositionLoc( GetEnumUnit(),temp_point2 )
set i = i+1
set temp_point = null
set temp_point2 = null
endloop
set spores = null
endfunction
The error is at
JASS:
call ForGroup( spores,function SporeBurstAbi )