- Joined
- Feb 14, 2005
- Messages
- 48
Ok, i have a jass script, and theres one thing wrong with it, and i don't know what. Heres the script
Does anyone know whats wrong -.-
JASS:
function Trig_Line_Barrage_2_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A001'
endfunction
function Trig_Line_Barrage_2_Actions takes nothing returns nothing
local unit cast = GetSpellAbilityUnit()
local integer i = ( GetUnitAbilityLevelSwapped('A000', cast) + ( 4 * GetUnitAbilityLevelSwapped('A000', cast) ) )
local real r = GetUnitFacing(cast)
local integer loopcount = 1
local unit last
loop
exitwhen loopcount > i
call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(cast), GetUnitLoc(cast), 0.00 )
set last = GetLastCreatedUnit()
call UnitApplyTimedLife( 0.65, 'BTLF', last )
call IssuePointOrderLoc(last, "attackground", PolarProjection(GetUnitLoc(last)),( 100.00 * 100.00 ), r)) )<--The Error is here. Says "INVALID ARGUMENT TYPE(UNIT)"
set loopcount = loopcount + 1
endloop
endfunction
//===========================================================================
function InitTrig_Line_Barrage takes nothing returns nothing
set gg_trg_Line_Barrage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Line_Barrage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Line_Barrage, Condition( function Trig_Line_Barrage_2_Conditions ) )
call TriggerAddAction( gg_trg_Line_Barrage, function Trig_Line_Barrage_2_Actions )
endfunction
Does anyone know whats wrong -.-