Please add a check for missing InitSprite()

Working on new editor enhancements?
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Please add a check for missing InitSprite()

Post by AND51 »

Hello!

I forgot InitSprite() within my testcode. To prevent future users from searching a non-existing error, I suggest to add a check, if InitSprite() is missing.

Code: Select all

;InitSprite() ;- try this

OpenScreen(640, 480, 32, "DrawingBuffer() Test")

StartDrawing(ScreenOutput())
	buffer=DrawingBuffer()
	For n=1 To 255
		PokeL(buffer+n, n)
	Next
StopDrawing()

FlipBuffers()

Delay(3456)
Commenting 1st line leads to a linker error :shock: that outputs 26 (!) errors...


Please, not that I'm not the best at programming games. Forgive me, if this request is illogical.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

I repeat: these kinds of errors are not handled by the IDE, but by the compiler and debugger.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Sorry, it's my mistake. I always swp IDE with debugger... :?

I don't mind wether you add the check to dther debugger or to the IDE... The main thing is, that you understand my request.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
Post Reply