user21775: I'm black and it's my turn. I'm playing in the Arena chess player against Stockfish.
This is my current board:
[fen ""]
[startply "31"]

1. e4 d5 2. exd5 e6 3. dxe6 fxe6 4. Nf3 Nf6 5. Bc4 c6 6. O-O Bc5 7. d4 Bb6 8. Re1 O-O 9. Nc3 Nbd7 10. Ng5 Ne5 11. dxe5 Qxd1 12. Nxd1 Ng4 13. Nxe6 Bxf2+ 14. Nxf2 b5 15. Bb3 Nxf2 16. Nc7+

I want to play Rb8:
1rb2rk1/p1N3pp/2p5/1p2P3/8/1B6/PPP2nPP/R1B1R1K1 w - - 2 17 

but I keep getting errors telling me that's illegal.
HOW IS THIS ILLEGAL??

user21775: It turns out I was in check: 


21775: <p>I'm black and it's my turn. I'm playing in the Arena chess player against Stockfish.
This is my current board:</p>

<pre><code>[fen ""]
[startply "31"]

1. e4 d5 2. exd5 e6 3. dxe6 fxe6 4. Nf3 Nf6 5. Bc4 c6 6. O-O Bc5 7. d4 Bb6 8. Re1 O-O 9. Nc3 Nbd7 10. Ng5 Ne5 11. dxe5 Qxd1 12. Nxd1 Ng4 13. Nxe6 Bxf2+ 14. Nxf2 b5 15. Bb3 Nxf2 16. Nc7+
</code></pre>

<p>I want to play <strong>Rb8</strong>:</p>

<pre><code>1rb2rk1/p1N3pp/2p5/1p2P3/8/1B6/PPP2nPP/R1B1R1K1 w - - 2 17 
</code></pre>

<p>but I keep getting errors telling me that's illegal.</p>

<p><strong>HOW IS THIS ILLEGAL??</strong></p>
 21775: <p>It turns out I was in check:&nbsp;</p>

<p><a href="https://i.stack.imgur.com/tRb7w.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tRb7wm.png" alt="enter image description here"></a></p>
