- Joined
- Oct 2, 2011
- Messages
- 89
Is having a variable inside a struct of type another struct possible? I am trying to do this but get a compiler error.
If you don't understand what I mean, something like this:
specifically I get an error when with "set store = UnitArray.create(30)"
UnitArray is from SortUtils in case the problem is with the struct, but I tried this with other structs and I get the same error. Am I doing something wrong or is this just not possible?
(http://www.wc3c.net/showthread.php?t=107903)
If you don't understand what I mean, something like this:
JASS:
struct test
UnitArray store
static method create takes nothing returns instance
local instance temp = instance.allocate()
set store = UnitArray.create(30)
return temp1
endmethod
method onDestroy takes nothing returns nothing
call store.destroy()
endmethod
UnitArray is from SortUtils in case the problem is with the struct, but I tried this with other structs and I get the same error. Am I doing something wrong or is this just not possible?
(http://www.wc3c.net/showthread.php?t=107903)