• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[JASS] WHY?! why?!! Why does ths happen?

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
929
ok im making a kind of moving spell but i cant get this to work
JASS:
function C_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'
endfunction

function C_Move takes unit u, unit a, real dist, real angle, location loc returns nothing

endfunction

function C_Actions takes nothing returns nothing
    local timer t = CreateTimer()
    local unit u = GetTriggerUnit()
    local unit a = GetSpellTargetUnit()
    local location loc1
    local location loc2
    local real dist
    local real angle
    call TimerStart(t, 0.035, true, function C_Move( u, t, dist, angle, loc1 ))
endfunction

//*-------------------------------------------------------------------------------------------------------*
//|                                         *END OF SCRIPT*                                               |
//*-------------------------------------------------------------------------------------------------------*
function InitTrig_Charge takes nothing returns nothing
  local trigger C = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( C, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( C, Condition( function C_Actions ) )
    call TriggerAddAction( C, function C_Actions )
  set C = null
endfunction

I get the error here
JASS:
    call TimerStart(t, 0.035, true, function C_Actions( u, a, dist, angle, loc1 ))
i get the error
Code:
Line 31: expected '

someone know why? and if you know why, tell me where :)
 
Last edited:
You can't use arguments when using timers. But it's possible to attach data to timers or other handles by f.ex. using "Local Handle Vars" and then retrieve the stored data in the function that needs the data.
 
Status
Not open for further replies.
Back
Top