I am struggling to understand what is the problem with the variable transfer. I am using [vJASS] - Buff System. The problem is that a variable assigned during buff application is not transferred to the Buff to onApply function. To clarity, here is an example:
In this example, test returns 0 onApply, but 1 onRemove. What is the problem and how can I fix this? This is a huge problem for me now, and I would really appreciate any help.
JASS:
struct TestBuff extends Buff
requirements...
integer test
method onRemove takes nothing returns nothing
debug call(return test)
endmethod
method onApply takes nothing returns nothing
debug call(return test)
endmethod
endstruct
struct Spell
method buff takes nothing returns nothing
local TestBuff b = TestBuff.add ...
set b.duration = ..
set b.test = 1
endmethod
endstruct
In this example, test returns 0 onApply, but 1 onRemove. What is the problem and how can I fix this? This is a huge problem for me now, and I would really appreciate any help.
Last edited: