This is a separate inquiry I have for the RPG I'm working on. I'm working on a construction function to add a bit more to do in the game. The system I'm working on isn't exactly the sleekest way to delineate this function, I'm sure, but it's what I've got so far.

My problem now lies in the inputting of a number by the player to select a structure to build. This failure to register the number as input and subsequent error message pictured here:

I know it is very easy to think you need these if/else blocks but again it can be avoided here.Also as soon as you notice yourself typing very similar code over and over, you need to try to think of how a function could be used.

This is still a bit messy but shows the idea. (code is python 2.x. Replace raw_input with input for python 3):

That is essentially what I wanted to figure out but had no real inclination of where to start. Print thank you for an infinite loop Mekire and metulburr! I award you both one whole internets. However, implementing the code you posted results in:

File "/Users/USER/CODE/duderpg2.py", line 109, in <module> RunIt.choose() File "/Users/USER/CODE/duderpg2.py", line 74, in choose self.current_supply() File "/Users/USER/CODE/duderpg2.py", line 69, in current_supply print("{:<10} {}".format("Material","Quantity"))ValueError: zero length field name in format