A Lame Program

Miscellaneous Forums/Blitz Showcase/A Lame Program

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 indentation should be
Global w
Global x=255
Global y
	While Not KeyDown(1)
		While MouseDown(1)
			Color w,y,x
					
			If KeyHit(2) Then
				x=255
				w=0
				y=0
			EndIf
			If KeyHit(3) Then
				x=0
				w=255
				y=0
			EndIf
			If KeyHit(4) Then
				x=0
				w=0
				y=255
			EndIf
			If KeyHit(5) Then
				x=255
				w=255
				y=255
			EndIf
			If KeyHit(6) Then
				x=255
				w=255
				y=0
			EndIf								
			If KeyHit(7) Then
				x=255
				w=0
				y=255
			EndIf	
			If KeyHit(8) Then
				x=0
				w=255
				y=255
			EndIf
			Oval MouseX(),MouseY(),10,10,1
		Wend
		If KeyHit(14) Then
			Cls
		EndIf
	Wend
End
Also you might concider "Select/Case" instead of the Ifs http://www.blitzmax.com/b3ddocs/command.php?name=Select&ref=2d_a-z Or at the least changing If endif If endif to IF elseIF elseIF ect http://www.blitzmax.com/b3ddocs/command.php?name=ElseIf&ref=2d_a-z
At the moment if keyhit is 2, your program is still checking that Keyhit is 3 etc, which you know it cannot be