Can you post the error just as text? Can't open that link at work.
Edit: You seem to be using type as a character array when you declared it as an int. Seeing as you posted a picture of the error, I'm guessing it came up in a pop-up during run time, which would likely happen if you used an int as a character array, like you are.