simple code problem

BlitzPlus Forums/BlitzPlus Beginners Area/simple code problem

Apollonius(Posted 2007) [#1]
I've just got back into playing with blitzplus I'm trying to make custom timers... nothing is displayed except 1 lol

Graphics 640,480,2

Global game_end = False
Global tmr_1=0

SetBuffer BackBuffer()

While Not (game_end=True)
Cls
	; Game End
	If(KeyHit(1))Then
		game_end=True
	EndIf
	
	tmr_1= tmr+1

	If(tmr_1>30)Then
	tmr_1 = 0
	EndIf
	
	Text 10,10,tmr_1


Flip
Wend
End



GfK(Posted 2007) [#2]
"tmr_1= tmr+1" should be "tmr_1= tmr_1+1"


Apollonius(Posted 2007) [#3]
thanks man.. I just saw my stupid error... sometimes errors are as stupid as that and you can look at your code and you just can't see whats wrong with it lol


GfK(Posted 2007) [#4]
Yep. Gets to the point where you can't see the forest for the trees sometimes.

Best thing to do is just put it down for an hour or two and do something else.


CS_TBL(Posted 2007) [#5]
I believe qube's new IDE will have syntax checking, this should then eliminate such errors.