Quantcast
Channel: Questions in topic: "loops"
Viewing all articles
Browse latest Browse all 184

Argument out of range

$
0
0
I have a function that has the following code: int random = Random.Range( 0, playerCards.Count - 1 ); return playerCards[ random ]; The function throws an "Argument out of range exception", right before i call the function i populate the playerCards List like so: for( int i = 0; i < 25; ++i ) { playerCards.Add( i ); } Can't seem to find what's wrong, please help me and thank's in advance.

Viewing all articles
Browse latest Browse all 184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>