• 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] Error in timer

Status
Not open for further replies.
Level 7
Joined
Jun 16, 2008
Messages
327
Good day fellow mappers,
I am busy working on a JASS-enhanced spell that calls down meteors to hir random points in an area, but that's not my problem. This spell is based on a timer to manage the spell's duration.

Please note I'm a beginner JASSer, so my problems are quite novice.
So, after creating a timer local and labelling it, I gave the call command to start it. Lalala, everything's fine...then IT happens:

JASS:
call TimerStart(Timer, 25.00, true, ???)

The last bit of the TimerStart function requires a "code handlerFunc". What the heck is that? I've never encountered it before.

Any help or advice would be appreciated,
Thanks :grin:
 
Level 7
Joined
Jun 16, 2008
Messages
327
It's a function to call when the timer expires. Leave it null if you don't want one called, but if this is for a spell, you almost definitely do.

JASS:
function ExampleFunction takes nothing returns nothing
endfunction

//...

call TimerStart(Timer,25.,true,function ExampleFunction)

Wow, thanks a lot, PurplePoot!!! :grin:
I never knew it was tha simple! Well, I guess that's the more common case for us JASS noobs :xxd:

I'll be sure to give you credit when my first, pefected spell pack comes out.
 
Status
Not open for further replies.
Top