String exception

Hi guys!
I am trying to make a game, but if the user inputs a string, i want to throw an
exception. How can i make this exception of the string?
You need to learn how to properly articulate yourself, else no one will know what you are actually trying to say.
If a user inputs a string like A or B or CC or..... The result should be:
ERROR 1: You entered a string
How can i make this?
(the real reason for this is that i want the user to input only numbers not string | double)
Last edited on
Topic archived. No new replies allowed.