You forgot to end one of your if statements:
Quote: "
if nHandgun = 0
print "You Hear a Noise"
wait key
play sound 1
print "You Feel a Sharp Pain in your chest!"
play sound 2
gameover = 1
else
if nRedKey = 0
print "You Hear a Noise"
wait key
play sound 1
wait key
print "You Aim Your Handgun and...."
wait key
print "BANG!!"
wait key
print "You hear the shot richochet off the wall"
wait key
print "You Missed...."
wait key
print "You Turn on your torch, yet you see nothing"
wait key
print "a sharp pain enters your lower back, you feel cold"
print "and collapse to the ground....."
wait key
print "you wake up in a pool of your own blood, you look around"
wait key
print "You are outside of the Factory!"
print "you pick up an ornate looking key from the floor,"
nOrnateKey = 1
wait key
gosub EnterFactory
else
print "Back in the Darkness,"
wait key
print "You notice a small red keyhole in the floor"
wait key
print "You use the Blood Red Key!"
endif
(add an endif right here)
"
You want a second endif after that one at the end. You see, you opened up one if statement and then opened another in the else, so you must end them both, I've tested and it runs, with the second endif.