Forum begins after the advertisement:


[Part 11] Errors for Harvestable Crop, and ArgumentOutOfRangeExceptions

Home Forums Video Game Tutorial Series Creating a Farming RPG in Unity [Part 11] Errors for Harvestable Crop, and ArgumentOutOfRangeExceptions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11599
    Jonathan Teo
    Level 18
    Moderator
    Helpful?
    Up
    0
    ::

    If you are getting some bugs with the harvesting of crops, with an ArgumentOutOfRangeException error appearing on the console, this topic may be helpful to you.

    An ArgumentOutOfRangeException happens when you try to access an array index that is outside of the range of the array. For example, if you have an array with 3 items, and you try to access the 6th item of the array with array[5], this error will occur.

    For this issue, it is likely that the Land index is not being assigned correctly.

    Ensure this.landID = landID; is in the LoadCrop function

    If you are getting the Collection was Modified error, this is a long-standing bug that was fixed in Part 17.

    #16720
    Jhan Khendrick Perez
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    Still having the “ArgumentOutOfRangeException” even though all of the arrangements is properly aligned, do I need to have the Transition part since I didn’t add it? for my game will only be in one scene.

    Thank you

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: