ophelius
Member
I have an array of structs. I want to make a copy and place it at the end of the array, but anything I do, the new copy is a reference to the old one, so any changes I make will change the old struct also.
This is what I've tried:
At this point the new struct is added and is identical to the struct at Array[Index], but like I mentioned, it's only a reference.
I've tried using array_resize with array_copy() as well, same thing.
How can I make a new copy so I can modify the new one without modifying the original?
Thanks
This is what I've tried:
Code:
var NewStruct = {};
NewStruct = Array[Index];
array_insert(Array, array_length(Array), NewStruct);
I've tried using array_resize with array_copy() as well, same thing.
How can I make a new copy so I can modify the new one without modifying the original?
Thanks