Ok i've read that post too. Anyways i've now tried to run with A6.60 Lite-C and there is a wdl file with the same name containing plugindir = "."; only it didn't worked. No crash or error message just the acknex window shows up.

Furthermore mesh.dll isn't working with A7.06.1 and 7.0.7.1/2/3 beta on my computer, either with Lite-C or C-Script. If I try to run the C-Script version the compiler doesn't understand what bmap is on this line -> Code:
bmap bmap_lightmap = "landscape_lm.dds";


When I try to run the Lite-C version with A7 stable or any of the beta I get the crash without error in the demo level using the full version of the dll. Is the mesh.dll compiled with VC2005 NET?

Another problem:

Tried to run the C-Script version against A6.60 Commercial, however there was a problem because on the A6 (old key.exe) license my full name is used and on A7 it's shortened. Strange, but on A6.60 Lite-C mesh.dll didn't present this message about "the mesh plugin isn't registered to you!" What should I do next?

Code:
/*
here is the lite-c version of the example script in case anyone would like to run the plugin demo with lite-c.
it should also work with the free lite-c edition. save it as examples_litec.c and also create the file
examples_litec.wdl which contains the line: plugindir = ".";
*/

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


void ent_loadseconduvset(ENTITY* entity1, ENTITY* entity2);
void ent_exportmesh(ENTITY* entity, STRING* filename);
void ent_importmesh(ENTITY* entity, STRING* filename);


ENTITY* skycube =
{
type = "skycube+6.tga";
flags2 = SKY | CUBE | VISIBLE;
material = mat_sky;
}


void applylightmaps();
ENTITY* tempentity;


//----------------------------------------------------------------------------- mtl_lightmap

BMAP* bmap_lightmap = "landscape_lm.dds";

MATERIAL* mtl_lightmap =
{
skin1 = bmap_lightmap;

effect=
"
texture mtlSkin1;
texture entSkin1;

technique t0
{
pass p0
{
Texture[0]=<mtlSkin1>;
Texture[1]=<entSkin1>;

// mix light map with dynamic lighting
TexCoordIndex[0] = 1;
ColorArg1[0] = Texture;
ColorOp[0] = AddSigned;
ColorArg2[0] = Diffuse;

// apply lighting to texture
TexCoordIndex[1] = 0;
ColorArg1[1] = Texture;
ColorOp[1] = Modulate2x;
ColorArg2[1] = Current;
}
}
";
}



//----------------------------------------------------------------------------- main
void main()
{
video_mode = 8;

vec_set(mat_sky.emissive_blue, vector(20,20,20)); // make sky a bit brighter

wait(3);
level_load("");
wait(1);

vec_set(sky_color, vector(250, 175, 75));

vec_set(sun_angle, vector(-30, 35, 0));
sun_light = 10;

vec_set(camera.x, vector(300, 0, 200));
camera.pan = 180;



STRING* meshfilename = "landscape_lm.mesh";


/*
//-------------------- example 1

you = ent_create("landscape.mdl", nullvector, 0); // load model with texture uv-set
you.material = mtl_lightmap; // assign light map material

tempentity = ent_create("landscape_lm.mdl", nullvector, 0); // load model with light map uv-set
ent_loadseconduvset(you, tempentity); // generate and assign a new mesh with both uv-sets
ent_remove(tempentity); // tempentity isn't needed anymore

ent_exportmesh(you, meshfilename); // save mesh with both uv-sets for reuse
*/


//-------------------- example 2

// for very huge models ent_importmesh() probably is faster than ent_loadseconduvset().
// usually ent_loadseconduvset() should be fast enough though.

if(you) {ent_remove(you);}

you = ent_create("landscape.mdl", nullvector, 0); // load model with texture uv-set
you.material = mtl_lightmap; // assign light map material
ent_importmesh(you, meshfilename); // load and assign the previously saved mesh


/*
//-------------------- example 3

// applylightmaps() cycles through all entities in the level and applies a light map
// if the two "_lm" files exist for the entity.

if(you) {ent_remove(you);}

ent_create("landscape.mdl", nullvector, 0);
applylightmaps();
*/


while(!key_any) {wait(1);}
def_moveset(); // default camera movement
}



//----------------------------------------------------------------------------- example 3

var file_exists(STRING* filename)
{
var filehandle;
filehandle = file_open_read(filename);
if(filehandle)
{
file_close(filehandle);
return(1);
}
else
{
return(0);
}
}

STRING* tempstring1 = "#100";
STRING* tempstring2 = "#100";
MATERIAL* tempmaterial;

void applylightmaps()
{
you = ent_next(0);
while(you != 0)
{
str_for_entfile(tempstring1, you);
str_trunc(tempstring1, 4);
str_cpy(tempstring2, tempstring1);
str_cat(tempstring1, "_lm.mdl");
str_cat(tempstring2, "_lm.dds");

if(file_exists(tempstring1) && file_exists(tempstring2))
{
you.material = mtl_create(); // they should be removed again when changing the level
tempmaterial = you.material;
tempmaterial.effect = mtl_lightmap.effect;
tempmaterial.skin1 = bmap_create(tempstring2); // they should be removed again when changing the level

tempentity = ent_create(tempstring1, nullvector, 0);
ent_loadseconduvset(you, tempentity);
ent_remove(tempentity);
}

you = ent_next(you);
}
}




smile