Accessed None trying to read property CallFunc_Array_Get

Hello,

I have created an array of a blueprint class called SpawnPoints. In another class, I have created an array of objects of type spawnPoints. Then I have a for each loop that goes through the content of the array and then set the xposition(public and included in the spawnpoints class) of each spawn point in the following way(first is my blueprint and next is my array):

I am getting the following error:

Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item from function: ‘ExecuteUbergraph_LaneBP’ from node: Set PositionX in graph: EventGraph in object: LaneBP with description: Accessed None trying to read property CallFunc_Array_Get_Item

Can you help me solve this so that I don’t get the accessed none error or if not then at least show me an alternative way of solving this problem? thank you

The objects in the array are not valid. You have to create objects of type SpawnPoint and put them in there.

Sorry but i have tried to do what you are telling me but i just can’t do it. Can you tell me how to create objects of type SpawnPoint and put them in my array?

Hi, if your SpawnPoint class is a child class of Actor (which I recommend), you can do it like this:

1 Like

Thanks a lot for the help. It works now :slight_smile: