#randi_range(int from, int to) generating ints outside of that range somehow

5 messages · Page 1 of 1 (latest)

somber matrix
#

For clarity's sake, I'm adding a random number to an Array that has to be within the set of indices that exist in the Array "border_proximities_checked". This should always do exactly that, and nothing else.

#

randi_range is an inclusive range, so the -1 is there to prevent generating one greater than the greatest index available in "border_proximities_checked". Tell how I have messed this up. I can't see it.

#

Some prints I get when testing this:

#

Those aren't errors, just my test prints. It does send errors, but those don't give the full picture. They just say it's out of bounds.

#

Look how "out of bounds" some of them are, somehow.