I don't understand what all this bracketiright stuff is in the if statement. I'm guessing either you or the foroum software might have converted it, but if that's not the case, that can't be there. Index out of bounds means that your code is trying to access something in an array outside of what the array currently contains. That's something it cannot do, so throws an error, but I think you probably already knew that. To learn more it would be necessary to see what's writing to that array and when.
Just in case you didn't know, if statements are meant to contain expressions to test so if (var == var2) if (var != var 2) and all your less than, greater than, less or equals, greater or equal, and all that stuff.
Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united