title: Cannot cast double as int
body: <p>I'm having a problem in my script where it says I can't convert a double to an integer...</p>
  
  <p>Here's the where the error is noted in the bat:</p>
  
  <pre><code>cm.getPlayer().yellowMessage("You have gained " + 
                  getJQ.getCurrentMap() + " JQ points!");
  </code></pre>
  
  <p>The error is off of the method <code>getCurrentMap()</code>, which is here...</p>
  
  <pre><code>public int getCurrentMap() {
      return maps.get((level - 1));
  }
  </code></pre>
  
  <p>Level is an integer that is incremented every time the player advances a level. What I don't understand is how I'm receiving that error. When I print out the <code>List&lt;Integer&gt; maps</code>, I get a list of numbers. I don't see what's wrong.</p>
  
  <p>Here is how I declare it:</p>
  
  <pre><code>private int level = 0;
  </code></pre>
  
  <p>Image of Error:
  <a href="https://i.stack.imgur.com/tktWP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tktWP.png" alt="Bat Error"></a></p>
  
  <p>Code:
  <a href="http://pastebin.com/FF1QPN2z" rel="nofollow noreferrer">Code - Look at the methods getCurrentMap and the declaration of maps in the file. Ignore everything else.</a></p>
  
  <p><a href="http://pastebin.com/yK1V1cm9" rel="nofollow noreferrer">Source Code: As you can see level is declared as an int, and getCurrentMap() only details with integers. There main lines that deal with this error are lines 29-32, and lines 59-61, where I push an array with a random value.</a></p>