Code Errors. Just Practicing.

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

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

you still need to flip the screen after a cls

Nice, thank you!

no problem :)