I've completely my first game titled Console Combat 1. Yay! It's currently in the Showcase: Console Combat 1
Source code is included and it's licensed under the do whatever the hell you want with any of my code (not that you would want to use that ugly uncommented clusterfuck) license(TM).
Error handling is rather difficult in the console (mostly input at wrong times) so attempting to screw it up will in fact screw it up. I also couldn't figure out how to allow spaces in input for the name, so that's out too.
Overall though, I'm happy with how it turned out and it makes for a fun little 10 minute time-waster. I learned a lot about OO design and why I need to use more commenting next time around. I also need to abstract things better functionally as well because I had a lot of word-for-word rewritten code.
On to Console Combat 2.
For spaces in string input, just use getline.
and you can detect incorrect input like this:
You'll have to implement your own check for strings though since it's possible to enter anything as a string.
Edit: I assuming this is C++.