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.
↧