NWR
New Member
- Reaction score
- 0
Hi I'm new to JASS and Thehelper.net but I have a problem with this code I can't seem to figure out (Invalid # of Arguements)
---Line with problem, when I put this into World Editor the ---Line gives a Invalid # of Arguements
Could anyone help me fix this?
JASS:
function Trig_Soul_Slash_Func001001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Soul_Slash_Func001001003002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_Soul_Slash_Func001001003002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Soul_Slash_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Soul_Slash_Func001001003002001(), Trig_Soul_Slash_Func001001003002002() )
endfunction
function Trig_Soul_Slash_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Soul_Slash_Func001001003001(), Trig_Soul_Slash_Func001001003002() )
endfunction
function Trig_Soul_Slash_Func001A takes nothing returns nothing
endfunction
function Soul_Slash1_Actions takes nothing returns nothing
local unit SoulSlashCaster = GetSpellAbilityUnit()
local unit SoulSlashTarget = GetSpellTargetUnit()
local location SoulSlashLoc = GetUnitLoc(SoulSlashTarget)
local integer Slashes = 8
local group Slash_Group
local unit SSTarget
local location SSTemp
set Slash_Group = GetUnitsInRangeOfLocMatching(800.00, GetUnitLoc(SoulSlashCaster), Condition(function Trig_Soul_Slash_Func001001003))
set SoulSlashLoc = GetUnitLoc(SoulSlashTarget)
call SetUnitPosition(SoulSlashCaster, SoulSlashLoc)
call AddSpecialEffectLoc("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl", SoulSlashLoc)
call SetUnitInvulnerable(SoulSlashCaster, true)
call UnitDamageTarget(SoulSlashCaster, SoulSlashTarget, ( 200.00 + ( 40.00 * I2R(GetUnitAbilityLevelSwapped(039;A000039;, SoulSlashCaster)) ) ), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL, null)
call SetUnitAnimation(SoulSlashCaster, "attack")
call SetUnitInvulnerable(SoulSlashCaster, false)
call DestroyEffect(bj_lastCreatedEffect)
loop
exitwhen Slashes == 0
set Slash_Group = GetUnitsInRangeOfLocMatching(800.00, GetUnitLoc(SoulSlashCaster), Condition(function Trig_Soul_Slash_Func001001003))
set SSTarget = GroupPickRandomUnit(Slash_Group)
set SSTemp = GetUnitLoc(SSTarget)
set SoulSlashCaster = GetSpellAbilityUnit()
call SetUnitInvulnerable(SoulSlashCaster, true)
call AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl", SSTemp)
call SetUnitPositionLoc(SoulSlashCaster, SSTemp)
call SetUnitAnimation(SoulSlashCaster, "attack")
call UnitDamageTarget(SoulSlashCaster, SSTarget, ( 200.00 + ( 40.00 * I2R(GetUnitAbilityLevelSwapped(039;A000039;, SoulSlashCaster)) ) ), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL, null)
set Slashes = Slashes - 1
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitVertexColorBJ( SoulSlashCaster, 100, 100, 100, 60.00 )
call AddSpecialEffectTargetUnitBJ( "weapon", SoulSlashCaster, "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" )
call PolledWait ( .25 )
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitInvulnerable(SoulSlashCaster, false)
call SetUnitVertexColorBJ( SoulSlashCaster, 100, 100, 100, 0.00 )
endloop
endfunction
//===========================================================================
function InitTrig_Soul_Slash takes nothing returns nothing
set gg_trg_Soul_Slash = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Soul_Slash, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Soul_Slash, Condition(function Trig_Soul_Slash_Func001001003))
call TriggerAddAction(gg_trg_Soul_Slash, function Soul_Slash1_Actions )
endfunction
JASS:
local location SSTemp
set Slash_Group = GetUnitsInRangeOfLocMatching(800.00, GetUnitLoc(SoulSlashCaster), Condition(function Trig_Soul_Slash_Func001001003))
set SoulSlashLoc = GetUnitLoc(SoulSlashTarget)
call SetUnitPosition(SoulSlashCaster, SoulSlashLoc)
---call AddSpecialEffectLoc("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl", SoulSlashLoc)
---Line with problem, when I put this into World Editor the ---Line gives a Invalid # of Arguements
Could anyone help me fix this?