Normally the expecting end of file error happens due to exotic syntax errors, like corrupt DATA stuff and things.
Maybe there is a problem with your ELseif construct. I never use ElseIf, so I'm not sure about it, but you should try to simplyfy it:
And I also think you don't need to retrieve a return value from RotateImage.
Maybe there is a problem with your ELseif construct. I never use ElseIf, so I'm not sure about it, but you should try to simplyfy it:
If pldir$="up" Then ply=ply-6 endif If pldir$="right" Then plx=plx+6 endif If pldir$="down" Then ply=ply+6 EndIf
And I also think you don't need to retrieve a return value from RotateImage.