Simply calling a function is not my problem. But in this case. I have a HIT_TARGET event and my function adresses the hit target, how do I call the function and give the hit ENTITY as parameter?

I noticed already, that my problem must already earlier, when I creat my enemies:

enemy = ent_create("bee1.mdl", vector(-100, 800, 400), start_bee_wave5);

This is done in a loop - so "enemy" got overwritten every time and keeps the value of the last loop. That`s the reason why I get the errormessage only sometimes. Can I create ENTITIES in an array like this?

enemy[i] = ent_create("bee1.mdl", vector(-100, 800, 400), start_bee_wave5);