While Keyhit waiting problems

BlitzMax Forums/BlitzMax Beginners Area/While Keyhit waiting problems

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Your code runs as expected... Remember that your C64 loop is 15 seconds long. If you hit the escape key and wait 15 seconds the program ends.

In your C64 Loop maybe just use something simple like
Function c64(timerval:Int)
  While timerval+15000 > MilliSecs()
	  Cls
       
 Local y=0,h
        Repeat
                h=Rand(5,60)
                SetColor Rand(255),Rand(255),Rand(255)
                DrawRect 0,y,GraphicsWidth(),h
                y:+h
        Until y>=GraphicsHeight()
	  Flip
         If KeyHit(KEY_ESCAPE) Then End  '<-------------------------------
  Wend
End Function