Yes, my original conversion is all "p."

Code:
function sparks(PARTICLE *p)
{
VECTOR temp;
temp.x = random(20) - 10;
temp.y = random(20) - 10;
temp.z = random(20) - 10;
vec_add(p.vel_x, temp);
p.alpha = 70 + random(30);
p.red=255;
p.blue=0;
p.green=0;
p.size = 2;
p.flags |= (BRIGHT|MOVE);
p.lifespan = 20;
p.event = fade_sparks;
}



But still cause E1515.

You may download the code and try lite-c laser

If you remark the "effect(sparks,100,my_vertex,nullvector);", the laser fire nicely.

If remove "PARTICLE *p" in sparks, no E1515 crash, like this
Code:
function sparks()
{
/*
VECTOR temp;
temp.x = random(20) - 10;
temp.y = random(20) - 10;
temp.z = random(20) - 10;
vec_add(p.vel_x, temp);
p.alpha = 70 + random(30);
p.red=255;
p.blue=0;
p.green=0;
p.size = 2;
p.flags |= (BRIGHT|MOVE);
p.lifespan = 20;*/
my.event = fade_sparks;
}



I know it does not make sense, but in case like this
Code:
function sparks(PARTICLE *p)
{
}


It still crash.

Last edited by Frederick_Lim; 08/23/07 14:03.