Keep getting error to the end of part 1 of realm rush

I’m currently getting the error:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

I’m doing the playtest and balance lecture of the course in realm rush and for some reason, this error has started to occur, I did change a few things around and redid my prefab variants. Pretty sure every part of my code is correct. I can still place my Ballista but the Rams do not spawn at all. If anyone could help I would appreciate it.

Hi JoeT,

Welcome to our community! :slight_smile:

ArgumentOutOfRange / IndexOutOfRange exception means that the code tried to access a non-existent index in an array, List or another collection. The first index in an array and List is 0, hence the last index is the length minus 1. For example, if the array has got a length of 2, and the code tries to access index 2, you will get this error message because there are only two “slots” in the array: at index 0 and at index 1.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms