Error "ArgumentOutOfRangeException"

Yep, it looks like an argumentOutOfRangeException error.

Was there a question you had?

how do i fix it

Make sure your index (eg an array or list) isn’t out of range. The error kind of spells it out for you.

where i find that

Hi,

Did you do everything exactly like Gary? The coordinates of the waypoints must not be negative.

1 Like


image_2022-02-13_175909

At a guess, line 44 of your enemymover script.

Put in a test before line 44 checking for null and number of paths. The list may be empty. If so, it’ll do that exception out of range error.

According to your second screenshot, the waypoints seem to have negative coordinates. Make sure the bottom left waypoint in your scene does not have lower coordinates than (0, 0). Path and Environment must be set to (0, 0, 0).

If it still does not work, please rewatch the video where Gary creates his environment.

1 Like

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

Privacy & Terms