Error: "Accessed None trying to read property"

Hello, I’m trying to create Snake game, but when I try to make it move it doesn’t and gives this error: Blueprint Runtime Error: “Accessed None trying to read property CallFunc_Array_Get_Item”. Node: Add Actor World Offset Graph: EventGraph Function: Execute Ubergraph BP Main Game Blueprint: BP_MainGame

  • you can do this instead of length-1:


  • how do you put stuff in that array?

Unfortunately last index didn’t help. Array is filled in this way(first image) and it works at the start of the game to create Head of the snake and whenever snake eats the food (second image).

Looks fine. You’re doing what seems to be a couple of redundant subtraction ops. Wouldn’t it be easier to run ForEach on that array?

Also, delay does not work in a loop.

Btw, how close is this:

Okay, I just come up with idea which worked for me. Move head independently from other parts and just save all positions in location array. Maybe not the most effective way but at least it works. There is image if someone face same problem:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.