Well first thanks DLively for commenting, I really appreciate the help.

Ugh I just got the error even when I removed the drop item lines. I tested this alot earlier when I removed the drop item lines and than I did not get a error. This error is getting really random. Although I did get it a bit later.

So far the observations (and this is getting a bit weird crazy ):
- it is occures randomly after an enemy dies, but the more ent_creates I seem to place/call when the enemy is dying/decaying (so after the break of the main loop of the enemy) the faster I get ther error.

The manual tells this about the error:
Quote:

Error E1516: Invalid memory area

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. This error is only issued if the warn_level variable is set to 2 or above. You can use the sys_marker function to find out where the memory area was allocated.


Not always when the crash occures an ent_remove is called (and I have no ptr_remove and sys_free in my script), so I doubt that is the problem. Which leads to the sentence talking about allocated memory area was overwritten by a damaged file or script bug. I doubt it are damaged files, since I use them alot already, so probably it is a script bug. I don't really know what qualifies here as a script bug, it sounds to me as it could be everything lol.

To me it screams like to much happens after the enemy dies. Maybe something else starts creating the problem and the code like creating the item etc. is the last straw?

ps: randomize is obsolete by the way and is replaced by random_seed wink.