wow anonymous, ok im not the greatest bloody triggerer in the world. I only learned jass about 2 months ago and pieced it together myself.
As i was saying this version is the first fully working one. Its not fully optimised.
And what do you mean
your version if i see correctly you are Vexorian. As i see your version has what you say "overflow" protection whatever that may do.
You use Blizzard.j wrapper functions, you should use natives.
Natives? I dont see any difference between UnitAddAbilityBJ() and UnitAddAbility()
you use ISignBJ(value)==-1, when you should just use Value<0.
And yes im not the greatest mathematics expert.
Your "optimizer" call "all" is kind of worthless, as rarely do you want to give a flat bonus to all stats, but you may want to give 5 arm, 20 dmg and 150 hp, or something like that.
Worthless or not, i had a use for it and thought it would be a help to put it in.
@ TorontoRock, as i see there is nothing wrong with my version. In the eyes of 'pros' its deemed inefficent, but it does its job and it shouldnt leak or cause lag. But if you must you can find their versions somewhere. Part if invex or dt4a or whatnot.