Error message when using loop index as an array index to get value in arrays
After testing and researching for a while, I found out that the first  lines of code that controls the moving of the ultrasonic sensor is the cause of the error. Previously, the code will make the motor move 2 degrees, then get the measurement of the ultrasonic sensor and put it inside the numerical array. It then loops 130 times so there is 130 measurements and 260 degrees of rotation.

What I am doing is to replace the entire array with that one value. Thus, when I get the value of the array, I am getting an non-existent value. Also, the array starts from zero, not one, so using the loop index for the array will not work as the loop index will not display a zero value index.  

Instead, I should use the 'write at index' mode of array operations. This way, it will add values to the array, not replace the entire array with that one value.

Now this is correct. Before that, I thought that the loop index was the cause of error.  

First time answering my own question, Im so proud lol.