I spent two hours last night trying to figure out what was wrong. I'm now at work and it's been bugging me. 
This is a spell I'm currently working on for one of my heros in my map. Just trying to make a buff seemingly stack with itself, so it can be reapplied and become stronger.
I've got the dummy activation spells set to inner fire and everything seems to be solid object wise. Is there anything I could have missed? And any ways to improve my code to have no leaks/use less memory? I understand that GA_buff is not needed, I just wanted to use it temporarily while I tested the spell out.
Anyway- Below is a basic layout of what I have done.
This is a spell I'm currently working on for one of my heros in my map. Just trying to make a buff seemingly stack with itself, so it can be reapplied and become stronger.
I've got the dummy activation spells set to inner fire and everything seems to be solid object wise. Is there anything I could have missed? And any ways to improve my code to have no leaks/use less memory? I understand that GA_buff is not needed, I just wanted to use it temporarily while I tested the spell out.
Anyway- Below is a basic layout of what I have done.
Code:
Targets allowed, self, ally, hero, alive
GA_count[] is an array of integers, initial value 0
GA_buff is an integer, initial value 0
Code:
A unit starts casting a spell
------------------------
Spell equal to GA
------------------------
set GA_buff = level of ability of GA on unit
If GA_count[player number of Owner of Target of order being issued] >= 100
then:
Create dummy with lv 100 GA
Cast inner fire on target
Wait for GA to be cast, every .3 seconds
Kill dummy unit
GA_count[....] = 100
Display Text: You cannot go higher than 100.
If GA_count[....] < 100 & GA_count[....] >= 1
then:
Create dummy with lv (GA_count[....] + GA_buff) GA
Cast inner fire on target
Wait for GA to be cast, every .3 seconds
Kill dummy unit
GA_count[....] = GA_count[....] + GA_buff
If GA_count[....] = 0
then:
Create dummy with GA_buff
Cast inner fire on target
Wait for GA to be cast, every .3 seconds
Kill dummy unit
GA_count[....] = GA_count[....] + GA_buff