I have been working on a game for a while, but unity keeps giving me unnecessary error messages which don’t effect the function of my game a tall. I have found the problem.
It occurs on this line of code:
if (Movables*.Right.movableBlock.Length > 0)*
When the array Movables is empty and has nothing in any of it’s slots.
The error keeps occurring, yet the code works perfectly, so I just need a way to code around the error. Perhaps somehow check for an empty array instead of checking in slot 0 which has nothing in it (the likely cause). I don’t know how to do this, so a simple solution would be great.
The error states 'Argument is out of range'