Hello, i'm a beginner in the pascal language, knowing only the basics. I don't know any other language. I made this text based game some days ago and i was working on my code until i got a error to it... You can get the code here: http://pastebin.com/A5eQa7Hv . The problem is that the 'Continue or Menu?" phrase appears where it isnt supposed to be... i tried to check all the begin's and end's if they are at they'r place and i couldn't find any error... I just don't know why "Continue or Menu?" appears randomly and why it won't accept the input (small c or small m) due my key2 := upcase(key2) . If anyone doesnt mind compiling it and checking the error i'll be very thankful . Thank You!

Ps: Don't mind the game for now, it's not finished, i'll fix the other "unfinished" parts of it but for now i need to get this fixed.