• 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.

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

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
930
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:
Level 22
Joined
Dec 31, 2006
Messages
2,216
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.
Top