Fixup error

BlitzMax Forums/BlitzMax Beginners Area/Fixup error

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.

I am also new to programming (totally) but in the interest of participating in the forum my suggestion would be to move a lot of your code into functions() outside your main loop.
Although my first game is only 190 lines of code including a dozen or so blank lines my main loop looks like this:
Repeat
	If KeyHit(1)
		If MouseX()<176
		pick=1
		checkhit()
		masterscore:+score
		ElseIf MouseX()>201 And MouseX()<307
		pick=2
		checkhit()
		masterscore:+score
		ElseIf MouseX()>332 And MouseX()<438
		pick=3
		checkhit()
		masterscore:+score
		ElseIf MouseX()>463
		pick=4
		checkhit()
		masterscore:+score
		End If
	End If
	If timer=60 bonus()
	drawlines()
	drawstates()
	drawcapitals()
	SetScale 1.5,1.5
	If timer=0 And n=5 Local myChannel = PlaySound (tick)
	DrawImage numtiles,559,59,tilearray3[n]
	DrawText"Total Score = "+masterscore,58,70
	DrawText"Speed Bonus:",410,70
	SetScale 1,1
	Flip
	FlushMem
	Cls
	timer:+1
	score=0
Until KeyHit (key_space)

I hope you can get some use out of my suggestion.