- Joined
- Feb 11, 2011
- Messages
- 1,860
Hi guys,
I would like to know how to (if possible) call a method inside a struct from another struct. For example:
I know that the above code has no point really, but I'm just using it as an example.
Thanks for any help.
I would like to know how to (if possible) call a method inside a struct from another struct. For example:
JASS:
scope TestScope
public struct TestData1
unit caster
unit target
static method test takes unit u, unit targ returns nothing
call KillUnit(u)
call KillUnit(targ)
set u = null
set targ = null
endmethod
endstruct
private struct TestData2
unit caster
unit target
static method test2 takes nothing returns nothing
local thistype D = thistype.allocate()
set D.caster = GetTriggerUnit()
set D.target = GetSpellTargetUnit()
call TestData1_test(D.caster, D.target) //How to do this part?
call D.deallocate()
endmethod
endstruct
endscope
Thanks for any help.