News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

possible closed loop detected

Started by RaverDave, January 26, 2011, 11:26:59 PM

Previous topic - Next topic

RaverDave

i get a "possible closed loop detected" error on this code! any ideas?


; PROJECT : spaceinvaders
; AUTHOR  : david wheeler
; CREATED : 27/01/2011
; EDITED  : 27/01/2011
; ---------------------------------------------------------------------
OpenScreen 640,480,32,2
SetFPS 60
ScreenVsync On
Mouse Off

global quit=false

creategfx()

repeat
cls 0

check_keys()
sync
until quit=true

function check_keys()
v=ScanCode()
  print v


If v=16
  quit=true
EndIf
endfunction

Function creategfx()

createimage 1,8,8
rendertoimage 1
for x=1 to 8
for y=1 to 8

next y
next x
rendertoscreen
endfunction






kevin

#1

  PlayBASIC requires that loops have code inside them,  otherwise the loop is pointless and potentially lock up causing.  

 This loop has no code it..


for y=1 to 8

next y


RaverDave