Invalid number of arguments

manofsteel

New Member
Reaction score
36
Whats wrong with this? I keep getting this error^...
JASS:
call UnitDamagePointLoc( GetTriggerUnit(), 0.1, 150, dp,dmg)

(Also some BJ's I need help with.:))
The unit is supposed to be teleported and create copies of himself at his position and damage nearby enemies.
Hole code:
JASS:
function Trig_WindWalk_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A010'
endfunction

function Trig_WindWalk_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local location t = GetSpellTargetLoc()
local location cp = GetUnitLoc(c)
local location p
local real dis = 0
local location wp
local real dmg = I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetTriggerUnit(), false)) + (udg_SpellDamage[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
local location dp
local integer looper = 1
local integer looperend = ( GetUnitAbilityLevelSwapped('A010', c) * 4 )
    call SetUnitFacingToFaceLocTimed( c, t, 0 )
set wp = PolarProjectionBJ(cp, ( I2R(GetUnitAbilityLevelSwapped('A010', c)) * 400.00 ), GetUnitFacing(c))
    loop
        exitwhen looper > looperend
        set dis = dis + 100.00
        set p = PolarProjectionBJ(cp, dis, GetUnitFacing(c))
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h007', GetOwningPlayer(c), p, t )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
set dp = GetUnitLoc(GetLastCreatedUnit())
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100, 100, 70.00 )
call UnitDamagePointLoc( GetTriggerUnit(), 0.1, 150, dp,dmg)
call RemoveLocation(dp)
        set looper = looper + 1
        call RemoveLocation(p)
    endloop
    call SetUnitPositionLoc( c, wp )
    call RemoveLocation (wp)
    call RemoveLocation (t)
    call RemoveLocation (cp)
set wp = null
set c = null
set t = null
set cp = null
set p = null
set dp = null
endfunction

//===========================================================================
function InitTrig_WindWalk takes nothing returns nothing
    set gg_trg_WindWalk = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_WindWalk, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_WindWalk, Condition( function Trig_WindWalk_Conditions ) )
    call TriggerAddAction( gg_trg_WindWalk, function Trig_WindWalk_Actions )
endfunction
 

Flare

Stops copies me!
Reaction score
662
If you look at the function in JASScraft
JASS:
function UnitDamagePointLoc takes unit whichUnit, real delay, real radius, location loc, real amount, attacktype whichAttack, damagetype whichDamage returns boolean


You can see exactly what you're missing (attack, damage and weapon type)

And UnitDamagePoint (the the Loc variant) is a very poor function :\ It can cause desyncs, and can teamkill
 

manofsteel

New Member
Reaction score
36
Can't believe I didn't saw that... and I can't use Jasscraft(mac).

And UnitDamagePoint (the the Loc variant) is a very poor function :\ It can cause desyncs, and can teamkill

Is there anyway I can fix it? Do I have to use a unitgroup?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top