i bmetcoder, i've not tried compiling it, but just ad a quick scan threw your code and noticed 2 errors that could be ausing the problem
At line 169 you have this, Change
Next to
Next ctr
if wrong = 5
sleep 50
cls
for ctr = 1 to 30
sleep 50
ink rgb(128,0,128),0
set text font "comic sans ms"
set text size 30
text rnd(580), rnd(400), "You loose! It was " + hang
next
goto startofprogram
endif
Also at line 138 you have this, but every time you use the command
IF, this will also cause that error as there are insufficent EndIf's
`If the user guesses wrong, add the body part
`to the number of wrong guesses.(ie: 1st wrong
`guess will show the head)
if found = 0 and wrong = 0
head()
wrong = wrong + 1
else
if found = 0 and wrong = 1
body()
wrong = wrong + 1
else
if found = 0 and wrong = 2
larm()
wrong = wrong + 1
else
if found = 0 and wrong = 3
rarm()
wrong = wrong + 1
else
if found = 0 and wrong = 4
lleg()
wrong = wrong + 1
else
if found = 0 and wrong = 5
rleg()
wrong = wrong + 1
endif
Try this instead
`If the user guesses wrong, add the body part
`to the number of wrong guesses.(ie: 1st wrong
`guess will show the head)
if found = 0 and wrong = 0 : head() : wrong = wrong + 1 : else
if found = 0 and wrong = 1 : body() : wrong = wrong + 1 : else
if found = 0 and wrong = 2 : larm() : wrong = wrong + 1 : else
if found = 0 and wrong = 3 : rarm() : wrong = wrong + 1 : else
if found = 0 and wrong = 4 : lleg() : wrong = wrong + 1 : else
if found = 0 and wrong = 5 : rleg() : wrong = wrong + 1
endif : endif : endif : endif : endif : endif