Invalid Blitz2D Buffer Handle

BlitzPlus Forums/BlitzPlus Programming/Invalid Blitz2D Buffer Handle

Pineapple(Posted 2009) [#1]
Alright, so I'm writing a code parser just for fun. And everything seems to be working fine except a couple things, and I've pinpointed the cause of one of them to this portion of code:

Case "i" ;initiate graphics
	Graphics Gw,Gh,Gx,Gy
	SetBuffer BackBuffer()
	Color Gr,Gg,Gb
	Cls
	Flip -1
	If debug DebugLog "Graphics initiated"


That sets my graphics mode when the command is given.
But when another, drawing, command is instructed, for example:

Case "r" ;rect
	Rect Gx,Gy,Gw,Gh,Gf


It gives me the error "Invalid Blitz2D Buffer Handle".
It does Cls and Flip -1 completely fine, though. What might be my issue here?


Nate the Great(Posted 2009) [#2]
so if you have debug set to true does it say graphics initiated before it draws the rectangle?

If not then maybe there is something wrong with your parser?


Pineapple(Posted 2009) [#3]
It does say graphics initiated