• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Somethings wrong!!

Status
Not open for further replies.
Level 5
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


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 -.-
 
Status
Not open for further replies.
Top