Howdy,

Today after I made and added a custom shadow (/that I made in paint shop pro, .png) for enemies, I got a memory error twice so far when testing. Removing the custom shadow lines seem to fix the error. The last ~3-4 weeks (or more) with testing/playing I got no memory error so I think the shadow or the code for it is the cause.

Code (inspired by the manual):

Code:
ENTITY* ent_shadow_enemy = { type = "Shadow_Enemy.png"; }
...
...

function set_resolutionandshadows() 
{
shadow_stencil = 2;
...
}
...

action enemy()
{
 ...
 set(my,FLAG3 | SHADOW);
 my.shadow = ent_shadow_enemy; //this line is the cause
 ...



Link to the shadow file:
http://www.gamefront.com/files/24334113/Shadow_EnemyError.zip

Maybe important (I doubt it though), I also had a second view open with the NOSHADOW flag set.

From the manual; "A function such as ptr_remove, ent_remove, or sys_free was called with an invalid or already-freed pointer; or an allocated memory area was overwritten by a damaged file or script bug.". Probably a bad damaged file than?

Tyty