I've made a spell, that is chain heal spell...
But when i try to activate it in my WE, it pop out a list of errors. Why can it be?
Here is the spell code:
There is one saying awaiting endif. The other ones are mostly to do something with the last part of my spell. It's when i am nullyfying my variables.
Can some1 fix this?
My JaSS Shop Pro doesn't find anything.
But when i try to activate it in my WE, it pop out a list of errors. Why can it be?
Here is the spell code:
JASS:
function Cond takes nothing returns boolean
return GetSpellAbilityId() == 039;A002039;
endfunction
function ChainHeal takes nothing returns nothing
local unit cast = GetTriggerUnit()
local unit prevtarg
local unit targ = GetSpellTargetUnit()
local unit nexttarg
local unit dummy
local location p = GetUnitLoc(targ)
local group postargets = GetUnitsInRangeOfLocAll( 500.00 , p)
local group donetargets
local integer noofdone
local real heroint = GetHeroStatBJ(bj_HEROSTAT_INT, cast, true)
if IsUnitAlly(targ , GetOwningPlayer(cast)) == true then
if IsUnitInGroup(targ , donetargets) == false then
set dummy = CreateUnitAtLoc( GetOwningPlayer(cast) , 039;h000039; , GetUnitLoc(cast) , 0.00 )
call IssueTargetOrder( dummy , "ChainHeal" , targ )
call UnitApplyTimedLife( dummy , 039;BTLF039; , 3.00)
call SetUnitLifeBJ(targ , ( GetUnitStateSwap(UNIT_STATE_LIFE, targ) + ( 3 * heroint)))
call TriggerSleepAction(3.00)
endif
endif
set dummy = null
set nexttarg = FirstOfGroup(postargets)
set p = GetUnitLoc(nexttarg)
set postargets = GetUnitsInRangeOfLocAll( 500.00 , p)
call GroupAddUnit(donetargets, targ)
set noofdone = noofdone + 1
set prevtarg = targ
set targ = nexttarg
set heroint = heroint * 0.75
loop
exitwhen noofdone == 16
if IsUnitAlly(targ , GetOwningPlayer(cast)) == true then
if IsUnitInGroup( targ , donetargets) == false then
set dummy = CreateUnitAtLoc( GetOwningPlayer(cast) , 039;h000039; , GetUnitLoc(prevtarg) , 0.00 )
call IssueTargetOrder( dummy , "ChainHeal" , targ )
call UnitApplyTimedLife( dummy , 039;BTLF039; , 3.00)
call SetUnitLifeBJ(targ , ( GetUnitStateSwap(UNIT_STATE_LIFE, targ) + ( 3 * heroint)))
endif
endif
set nexttarg = FirstOfGroup(postargets)
set p = GetUnitLoc(nexttarg)
set postargets = GetUnitsInRangeOfLocAll( 500.00 , p)
set dummy = null
call GroupAddUnit(donetargets, targ)
set noofdone = noofdone + 1
set prevtarg = targ
set targ = nexttarg
set heroint = heroint * 0.75
endloop
set cast = null
set targ = null
set prevtarg = null
set nexttarg = null
set p = null
set postargets = null
set donetargets = null
function InitTrig_ChainHeal takes nothing returns nothing
local trigger t
set t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition(function Cond))
call TriggerAddAction( t, function ChainHeal)
endfunction
There is one saying awaiting endif. The other ones are mostly to do something with the last part of my spell. It's when i am nullyfying my variables.
Can some1 fix this?
My JaSS Shop Pro doesn't find anything.