- Joined
- Jul 23, 2005
- Messages
- 329
I tried searching, but had no idea which keywords would produce the following question without having 3 pages of posts that don't have anything to do with the question I was asking.
...So here's to a new topic!
I have two functions calling each other, one which calls the other via a timer, the other which calls the other via "call", but passes on a unit variable. So... The code looks like this:
And now I encounter a problem. I can't do this because the function BounceyBoucey doesn't exist yet when the compiler gets to the "Call BounceyBoucey" line, so yeah. Any way I can get a function to call on a function below it?
...So here's to a new topic!
I have two functions calling each other, one which calls the other via a timer, the other which calls the other via "call", but passes on a unit variable. So... The code looks like this:
JASS:
function WaitForTheAttack takes nothing returns nothing //Called by timer
//Does stuff with the timer, and...
call BounceyBouncey( Attacked )
endfunction
function BounceyBouncey takes unit BounceFrom returns nothing
//Does stuff with the unit, and...
set TempTimer = CreateTimer()
call TimerStart( TempTimer, 0.01, true, function WaitForTheAttack ) )
endfunction
And now I encounter a problem. I can't do this because the function BounceyBoucey doesn't exist yet when the compiler gets to the "Call BounceyBoucey" line, so yeah. Any way I can get a function to call on a function below it?