"Surface Index out of range" (z-sorting!)

Blitz3D Forums/Blitz3D Beginners Area/"Surface Index out of range" (z-sorting!)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm trying to use Beaker's (+fredborg's) Alpha z-sorting code to fix the alpha on a 3000 triangle character. She's not yet animated, but she still causes problems for the systems.

The code I'm using is here:
http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=850

When I run the code on my loaded .b3d model I get "Surface Index out of range".

Does anyone have any idea what is going wrong?

I would really like to be able to enable alpha sorting on my characters to allow use of alpha in the costume design, and I'm starting to think this will be impossible if I stick with blitz. :(