Headache with LoadAnimImage

BlitzMax Forums/BlitzMax Beginners Area/Headache with LoadAnimImage

Nah, your use of LoadAnimImage is fine. You're loading 52 frames, starting from frame 0.

The 0 and 52 represent the first frame, and the total number of frames (not the first and last frame). The index of the last frame you've loaded is 51.

Try changing this bit of your code:
Local countera=51 'THIS LINE CHANGED
Local counterb=51 'THIS LINE CHANGED

While countera>=0 'THIS LINE CHANGED
	randoma=Rand(0,51) 'THIS LINE CHANGED
	If numbersa[randoma]=0 Then
		numbersa[randoma]=countera
		countera:-1
	End If
Wend

While counterb>=0 'THIS LINE CHANGED
	randomb=Rand(0,51) 'THIS LINE CHANGED
	If numbersb[randomb]=0 Then
		numbersb[randomb]=counterb
		counterb:-1
	End If
Wend


It really will pay to get used to using 0 instead of 1 as a base for everything. Your code will be a lot more consistent and understandable. :)