Sqwince 1 Posted July 8, 2022 Trying to figure out why I keep getting NULL pointer references when working with the map<int,object>.get(int). From the debugger it looks like I am properly setting the key as int = 1. The value is an object reference. When I use map.get(1) it returns NULL. Any tips or suggestions? Is this implementation valid? Ot should I just work with arrays instead? Final array would just be the same size as number of players. Share this post Link to post Share on other sites
Sqwince 1 Posted July 9, 2022 For anyone who also runs into this, I think I figured it out. When dealing with Objects in the map have to use "ref" in the type def in the map. protected ref map<int, ref MyClass> myMap = new ref map<int, ref MyClass>; Share this post Link to post Share on other sites