Hi there, its seems Lite-C doesn't like this bit of code, but im not sure why:

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

ENTITY* FLOOR;
VECTOR pixel2;
var pixel;
var num_box;
var posx;
var posy;
BMAP* texture;

bmap_load(texture, "hello.bmp", 0);

function new_box()
{
posx=0;
posy=0;
while (posx<75)
{
posx += 2;
while (posy<32)
{
posy += 2;

pixel = pixel_for_bmap(texture,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;

{
/*more commands*/
}
num_box=num_box+1;
wait(1);
}
}
num_box=num_box+1;

}
===============================================================
It's the bold line causing problems, the engine gives the unhelpfull message:

ERROR E1513
"Crash in main"

Can anyone help?


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