title: Index was outside the bounds of the array with randomization function
body: <p>So I've tried to create a randomization function for a game to randomly generate characters from an array and add the result into another however it hasn't really worked and keeps throwing an &quot;Index was outside the bounds of the array&quot; error and I'm not too sure why. :( I've looked online and haven't really found any solutions that worked.</p>
  <p>I've tried changing the dice to start at zero or one as well as changing the maximum number accordingly, I've also changed the character array from dynamic to fixed and nothing I've done has helped as its still the same line with the same error</p>
  <p><a href="https://i.stack.imgur.com/sAXwv.png" rel="nofollow noreferrer">Screenshot of code throwing the error </a></p>
  <p>the array was declared as (couldn't fit it in a screenshot)</p>
  <pre><code>string[] player1_characters = new string[13] { &quot;Xingqiu&quot;, &quot;Razor&quot;, &quot;Bennett&quot;, &quot;Aether&quot;, &quot;Kaeya&quot;, &quot;amber&quot;, &quot;fischl&quot;, &quot;noelle&quot;, &quot;Lisa&quot;, &quot;Xinyan&quot;, &quot;Ningguang&quot;, &quot;chongyun&quot;, &quot;barbara&quot; };
  </code></pre>
  <p>The other array is declared as:</p>
  <pre><code> string[] player1_output = new string[] { };
  </code></pre>
  <p>I'm pretty new to c# and don't know what's going on with it XD any help would be amazing ^^</p>