Bug at loading

BlitzMax Forums/BlitzMax Programming/Bug at loading

FantomKite(Posted 2009) [#1]
Hi!
The problem consists that at program start, the logo, flying object, a background, an icon etc. should be loaded, but sometimes the logo and an icon does not wish to be loaded, that is does not wish to appear. Why so?


Htbaa(Posted 2009) [#2]
Have you checked the return values of your load commands?


GfK(Posted 2009) [#3]
Its impossible to say what the problem is (short of guessing), without seeing some code.


FantomKite(Posted 2009) [#4]
This part is responsible for a portrayal

The announcement of variables and functions
...
700 Repeat
	If (AppTerminate())		
		End;
	End If

	Select GameState
	Case "Start"		
		If (MilliSecs() - tick) / 10 > 1 Then
		SetBlend alphablend
		tick = MilliSecs()
		shat:+1
		If shat > 360 Then shat = 0
		animt:+8
		If animt >= 10 Then
			anim:+1
			animt = 0

			If anim >= 3 Then anim = 0		
		EndIf
		Cls
		
		SetAlpha(fon_a)
		DrawImage(LoadingFon , 0 , fon_y) 
		SetAlpha(1)
		
		fon_a:+0.5
		If fon_a > 1 Then fon_a = 1
		

		DrawImage(LB_FlyStart[anim], fly_x, 200 + Sin(shat * 15) * 5)		
		If fly_x > 1024 + 100 Then fly_x = 1024 + 100
		
		SetAlpha(icon_alpha) 
		DrawImage(Icon, 300, 85)		
		SetAlpha(1)
		
		SetAlpha(logo_a) 
		SetScale(logo_s, logo_s)
		DrawImage(Logo, logo_x, logo_y)
		SetAlpha(1) 
		SetScale(1 , 1)
		
746		DrawImage(flower, 29, flower_y)
...
5292 Forever



GfK(Posted 2009) [#5]
Are you getting an error message of any kind?

If you get 'reference to null object', 'image does not exist' or whatever, then the problem is to do with how the assets are loaded, not with how they're drawn.

If you get no errors, but the images are 'not drawn', then I'd be looking at the contents of icon_alpha, logo_alpha and fon_a. Its quite likely that they ARE being drawn, but either with 0 alpha, or some place off screen. All your alpha variables should be float or double.

shat:+1
lol :)