Warcraft III resources & community, 2003–2006 · archived

Somethings wrong!!

5 posts
#1

Somethings wrong!!

Ok, i have a jass script, and theres one thing wrong with it, and i don't know what. Heres the script


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 -.-
#2
Im confused at what that is, so i don't know what to do :evil: :evil: :evil: :twisted: :twisted: !!!
#3
Does it give you an error when saving or what exactly is the problem?
#4
Yea, the problem occurs when i try to save or enable it.
#5
chances are it's probably a spelling error somewhere. That's my only problems when i use custom scripts, perhaps it's the same problem for you. Dunno. sorry bout that.