Spot the error?

Either do Length -1 for Max random or use array Last Index instead. You’re exceeding array bounds.


in, b4 arrays start at 0

So I have a piece of code that runs 90% of the time correctly:

However every 1 in 10 it gives me the following error:

So now I am confused as to why it works most of the time but every so often it does not. It can’t go beyond the number of items in the array and it doesn’t go below half way through the array. So why would it access none? The array is filled the same way every time, literally nothing changes but every so often I get the error.

Am I missing something stupidly obvious?

Thanks

Ahhhhh ■■■■, I knew it would be something dumb I.E me.

Thanks!