Okay so this is a super weird problem, and I cannot figure it out. I’m working on a space battle game, and specifically for the purposes of this question, I’m working on the system that checks for crew in a room to determine their skill in operating the system in the room. I won’t get into mechanical details, because my problem basically boils down to this:
I have multiple arrays of “crewmates” (a class I made based on Character that will hold logic for your crew), and the arrays are seemingly starting with 1 element, even though I am not setting any defaults, and there isn’t even a crewmate in the level when I’m in PIE that could be in said array. And yet, when I compare the length of the array to see if it is greater than 0 to determine if I parse it, the branch passes, meaning the array supposedly has a length greater than 0 when nothing is in it.
The exact error message I get is this:
Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item from function: ‘getCrewReactorSkill’ from node: Set skill in graph: getCrewReactorSkill in object: Room
Here is an image of the graph this error is referring to. Again, there is not even a crewmate in the level (as per the level browser during PIE), so there is no way that the array has an element in it, and yet, it’s passing the length test anyway.
IMAGE: http://imgur.com/yla9zo3
I have some other issues that I think may be tangential to this one, but I will save asking those for after I get this question answered since it may clear up the others.
Thanks for your help!!
EDIT: The function where this error is occurring is a ‘pure’ function, if that makes a difference, though I tested with both pure and unpure and the error was the same.