Mizev 19 Posted September 20, 2018 I'm trying to assign an array element of type parameter: array<Param> ListZone = new array<Param>; Param2<vector,int> m_Zone; m_Zone = new Param2<vector, int>("3000 0 9000", 15); Print(m_Zone); ListZone.Insert(m_Zone); Print(ListZone.Get(0)); In the log: Param2<vector,int><94fb7990> NULL What am I doing wrong? p.s. sorry about my English. Share this post Link to post Share on other sites
Jacob_Mango 33 Posted September 20, 2018 ref array<ref Param> ListZone = new array<ref Param>; ref Param2<vector,int> m_Zone; m_Zone = new Param2<vector, int>("3000 0 9000", 15); Print(m_Zone); ListZone.Insert(m_Zone); Print(ListZone.Get(0)); This should work. Share this post Link to post Share on other sites
Mizev 19 Posted September 20, 2018 I work a few hours trying different ways, but it didn't work. Share this post Link to post Share on other sites
Mizev 19 Posted September 21, 2018 The problem is solved! Share this post Link to post Share on other sites
SmashT 10907 Posted September 21, 2018 56 minutes ago, Mizev said: The problem is solved! How did you solve it, in the case others run into a similar issue and find this thread? Share this post Link to post Share on other sites
Mizev 19 Posted September 21, 2018 2 hours ago, smasht said: How did you solve it, in the case others run into a similar issue and find this thread? I gave a simplified listing of the script. 1. The problem was different. I initialized the global variable in the wrong place. 2. As Jacob_Mango suggested, it is important to do so: ref array<ref Param> ListZone = new array<ref Param>; 1 Share this post Link to post Share on other sites