array issue

You need to use “last index” rather than “length” for the max of your random float in range. The last index is the last index you can look up.

The only difference is that an array with 1 item has a length of 1 but a last index of 0. So length is always +1.

Also on your random 1-3 int for number of houses, technically if you want the possibility to only have 1 house, you should have the min be 0. With 1, it will actually run once. Once for 0, then for 1.