Python IDLE 3.5 invalid literal for int() with base 10
<p>I'm new to python, and I can't figure out how to make this work, it just wont work. (other answers won't help me)</p>

<p>Here's my code:</p>

<pre><code># My First Python Game Thing
# Aka Endless Walking Simulator
game_temp1 = True
def choiceroom_thing1():
    while game_temp1:
        directionchoice = input('L(left)R(Right)B(Backwards)F(Forwards)')
        direction = int(directionchoice)
        if direction in ['L', 'R','B', 'F']:
          game_temp1 = False
        if direction == "L":
              print ('You went Left!')
        if direction == "R":
              print ('You went Right!')
        if direction == "B":
              print ('You went Backwards!')
        if direction == "F":
              print ('You went Forwards!')
        game_temp1 = True
        room_count = room_count + 1
        choiceroom_thing1()
print ('Hello Jeff...')
print ('Heres my first game')
print ("Adventure Game")
input("Press Any Key To Continue...")
room_count = 1
while game_temp1:
    directionchoice = input('L(left)R(Right)B(Backwards)F(Forwards)')
    direction = int(directionchoice)
    if direction in ['L', 'R','B', 'F']:
      game_temp1 = False
    if direction == "L":
          print ('You went Left!')
    if direction == "R":
          print ('You went Right!')
    if direction == "B":
          print ('You went Backwards!')
    if direction == "F":
          print ('You went Forwards!')
    game_temp1 = True
    room_count = room_count + 1
    choiceroom_thing1()
</code></pre>

<p>And then I get this error when I run it.</p>

<pre><code>Traceback (most recent call last):
  File "C:/Users/Owner/Desktop/PythonProjects/Blah From Book.py", line 27,
line 27, in &lt;module&gt;
    direction = int(directionchoice)
ValueError: invalid literal for int() with base 10: ':'
</code></pre>

<p>Can someone please fix my code?</p>

<p>you do not need to convert <code>directionchoice</code> to an <code>int</code>.<br>
<code>direction</code>  should be equal to <code>directionchoice</code>.<br>
Then test if <code>direction</code> is not in the wanted choices:    </p>

<pre><code>if direction not in ['L', 'R','B', 'F']:
</code></pre>

python traceback