How to fix getting 0 from array

I’m getting this error, does this mean that I’m using the wrong variable type that cant receive the array? I was following a tutorial for [this][1].

The action mapping works but not the axis and I don’t think the variable is taking in the key but I’m really not sure.

I just closed and reopened the project, tried changing the get to get a copy instead of reference. Then it worked, I changed it back to get reference and it also worked. I don’t know if the problem is going to happened again I’m just confused.

It means you’re trying to access the first slot in a zero length array.

In other words ‘get axis by mapping name’ is giving you nothing…

You need to do the check, THEN, read from array. You’re reading [0] even when the check fails :slight_smile: