Flare
Stops copies me!
- Reaction score
- 662
JASS:
1) Uninitialized variable error, thread crashes there at the ForGroup call
2) Why are you using a group? If you are using a timer per instance, just handle the data within the timer callback i.e.
JASS:
static method stununit takes nothing returns nothing
local data d = GetTimerData (GetExpiredTimer ()) //this data, and the data attached to the unit, should be the same if things are done right
//assuming everything is in order, which it should be
call UnitRemoveAbility (whichUnit, buffId)
call d.release ()
//and any other cleanup that may be necessary
endmethod
Anything that requires a code type (i.e. ForGroup, TimerStart, and some others) cannot have a function that takes parameters. ALL non-static methods take a parameter (integer this), you just don't see it when you are calling them i.e.
JASS:
call data.dynMethod ()
would compile to something like
JASS:
call structName__dynMethod (data)