Sigh, I am trying to make my first MUI spell and ended up with this problem.
I need to run a specific function, every 0.01 second without switching on and off triggers with periodic events (so that I can use local variables). The function that needs to be run is:
Thus, I tried this:
The error message is " Expected ' ".
I believe the reason that didn't work is because JASS refuses to let me pass parameters to a "function within a function" when such a function is required as a parameter of the original function, since I have a similar line that can't work:
...or I may be completely wrong...(new to JASS)
So... any experts willing to help me with these? I really don't want to resort to arrays and hashtables... (they make my brain hurt)
I need to run a specific function, every 0.01 second without switching on and off triggers with periodic events (so that I can use local variables). The function that needs to be run is:
JASS:
function Attack takes unit projectile, real CasterX, real CasterY, unit Caster returns nothing
Thus, I tried this:
JASS:
call TimerStart( T, 0.01, true, function Attack( projectile , CasterX , CasterY, GetSpellAbilityUnit() ) )
The error message is " Expected ' ".
I believe the reason that didn't work is because JASS refuses to let me pass parameters to a "function within a function" when such a function is required as a parameter of the original function, since I have a similar line that can't work:
JASS:
call GroupEnumUnitsInRange( targets, GetUnitX(projectile), GetUnitY(projectile), 100, Condition(function IsTargetNotSelf(projectile) ))
...or I may be completely wrong...(new to JASS)
So... any experts willing to help me with these? I really don't want to resort to arrays and hashtables... (they make my brain hurt)