Code Callback - Passing Arguments?

Status
Not open for further replies.
Level 2
Joined
Jun 25, 2009
Messages
19
Okay, first of all, here's my code:

JASS:
call TimerStart(time, 10, false, function Revive_Player)

It starts a timer, called time, which is supposed to start the function Revive_Player after ten seconds. The problem is that the function needs to be passed variable, u, the unit to be revived. So I tried this:

JASS:
call TimerStart(time, 10, false, function Revive_Player(u))

Which gave the error:
Expected '

Also tried this:

JASS:
call TimerStart(time, 10, false, Revive_Player(u))

Which gave this error for the next line:
Invalid argument type (void)

So what is the proper way of doing it?
 
Status
Not open for further replies.
Top