Code Errors. Just Practicing.

Blitz3D Forums/Blitz3D Beginners Area/Code Errors. Just Practicing.

Apollonius(Posted 2003) [#1]
Well its not exactly an error but the code is suppose to erase if the variable is false and draw if its true check the code out:
Cls 
While Not KeyHit(1)
; START
If KeyHit(2) Then
drawMain = False
EndIf
If KeyHit(3) Then
drawMain = True
EndIf

If drawMain = True Then 
DrawImage MMenu01,0,10
DrawImage MSi ,15 ,25
DrawImage MMul  ,15 ,60
DrawImage MOp     ,15 ,95
DrawImage MCre      ,15 ,130
DrawImage MQu       ,15 ,165
Flip
Else
Cls
End If

; END
Wend


What did I do wrong and why? (learning needs to be learn by practicing ;) and questioning :P )

note: the code draw but wont erase :S


Perturbatio(Posted 2003) [#2]
you still need to flip the screen after a cls


Apollonius(Posted 2003) [#3]
Nice, thank you!


Perturbatio(Posted 2003) [#4]
no problem :)