Skip to content

ValueError when type of race is a non-numeral #24

@shashankbalaji02

Description

@shashankbalaji02

Here is the output of the program:

1- New Game
2- Load Game
3- Exit
1
What is your name?
My name is: hi
Choose a race
1- Human                2- Elf          3- Orc
My race is: a
Traceback (most recent call last):
  File "./knight-training", line 258, in <module>
    main()
  File "./knight-training", line 227, in main
    create_hero()
  File "./knight-training", line 105, in create_hero
    race_choice = int(input("My race is: "))
ValueError: invalid literal for int() with base 10: 'a'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions