Tsk, sorry Evil SOB but its none of those things:

1) i changed "texture" handle to MYBMP

2) the posx/posy variables are stopped before the dimensions of the bitmap are reached. (Image size 78x33)

3) the image is in 16 million colours!

I also tried the bmp_lock function to, but it seemed to do nothing, and i still get the error!
==================================================================================

#include <acknex.h>
#include <default.c>

VECTOR pixel2;
var pixel;
var num_box;
var posx;
var posy;
BMAP* MYBMP;

var crackman; // debug variable to watch

bmap_load(MYBMP, "hello.bmp", 0);
bmap_lock( MYBMP, 0);

typedef struct
{
ENTITY* model;
} box;


function new_box()
{

crackman += 1;
posx=0;
while (posx<74)
{
posx += 2;
posy=0;
while (posy<30)
{
posy += 2;

pixel = pixel_for_bmap(MYBMP,posx,posy); // SHOULd get the bitmaps pixels color
pixel_to_vec(pixel2, NULL,8888,pixel); // SHOULD change the color to a *vector*
if (pixel2.x + pixel2.y +pixel2.z > 100) // IF the result is brighter than a certain amount DO SOMETHING
num_box=num_box+1;

{
box my_box;
/* box loading stuff */
wait(1);
/* more box setup stuff */
}
num_box=num_box+1;
wait(1);
}
}
num_box=num_box+1;

}


I am a noob to this... Blitz3D is where i am best at!