O.....K.....
Ive done the working example as found below inside the spoiler.
This works (well) as expected, but I still want to declare the array with
ENTITY **slab_ents[4]; instead of ENTITY ***slab_ents;
So Im going to try reverse engineering this example and see how we go...
ENTITY ***slab_ents;
void create_slabs()
{
var LOD, i;
slab_ents = (ENTITY***)sys_malloc(sizeof(ENTITY**)*4);
for(LOD=0; LOD<4; LOD++)
{
slab_ents[LOD] = (ENTITY**)sys_malloc(sizeof(ENTITY*)*10);
for(i=0; i<10; i++)
{
(slab_ents[LOD])[i] = ent_create("slab3.mdl", nullvector, NULL);
}
}
}
void slabs_terminate()
{
var i, LOD;
for(LOD=0; LOD<4; LOD++)
{
for(i=0; i<10; i++)
{
ent_remove((slab_ents[LOD])[i]);
}
sys_free(slab_ents[LOD]);
}
sys_free(slab_ents);
}