dudeim
New Member
- Reaction score
- 22
Hey,
I'm currently facing a little problem.
I'm having multiple structs that I need to store into one array (I generate the structs with textmacro's except for the last struct D in the example) all those structs have the same variables and variable names also the same methods exist there.
So here is a little example of what I want
So how would I do something like this?
I'm currently facing a little problem.
I'm having multiple structs that I need to store into one array (I generate the structs with textmacro's except for the last struct D in the example) all those structs have the same variables and variable names also the same methods exist there.
So here is a little example of what I want
JASS:
struct A
string name //this would be set when created to A
endstruct
struct B
string name
endstruct
struct C
string name
endstruct
//however many I want there to be
//now I have another struct which should be able to store the instances from those structs
struct D
sometype array Structs[50] //in this I should be able to store the other structs I tryed using integer but it gave me an error when I did Structs[1].name
endstruct
So how would I do something like this?