I tried create spell in JASS only and of course i filed at Syntax error. whats wrong?
JASS:
function Trig_Fire_Barrage_Actions takes nothing returns nothing
local integer int = GetUnitAbilityLevelSwapped(039;A00Z039;, GetSpellAbilityUnit())
local location p1 = GetSpellTargetLoc()
local location p2
local real angle = 0
local integer x1 = 1
local integer x2 = int
loop
exitwhen x1 > x2
set p2 = PolarProjectionBJ(p1, 300 + (50 * (int - 1)), angle)
call CreateUnitAtLoc(Player(0), 039;H007039;, p2, AngleBetweenPoints(p2, p1))
call UnitApplyTimedLife(GetLastCreatedUnit(), 039;BTLF039;, 10.5)
IssuePointOrderLoc( GetLastCreatedUnit(), "clusterrockets", p1)
set angle = angle + (360 / int)
call RemoveLocation(p2)
set p2 = null
set x1 = x1 + 1
endloop
call RemoveLocation(p1)
set p1 = null
endfunction