Hi friends! So before I start, i just have to say that I have fixed this script crash (as far as I know :D) but I wanted to know what could have happened internally when it was crashing.

Bascially, I was trying to do local avoidance of AIs while theyre running around. Using ent_next, each AI checks every entity, and if they can be shoved, they will do some stuff to find an angle to push away from. an extra single c_move was used for this (not for every entity that was in range)

The game ran correctly for some time, but then I would get a script crash in a totally different function, one that had nothing to do with the local avoidance snippet. I would try some fixes, but it would still script crash after some time.

After testing and testing and keeping track as many things as possible, I narrowed it down to this innocuous looking definition of variables that I didnt pay attention to:

VECTOR my_shove2;
VECTOR shove_temp2;
ANGLE my_shove2;

As you can see, my_shove2 was declared as both a VECTOR, and an ANGLE. Can lite-C handle this?

What I dont understand, was that with these declarations, the game worked for some time, then script crashed.

How was it able to work for some time then crash? Shouldnt it have crashed as soon as possible?

The script that was crashing was the pathfinding script. However, once I removed this shoving section from the AI, the game never crashed in the script! the AIs continued to pathfind the level, even when leaving the game running for a couple hours. BUt once I put the shoving snippet back(the double my_shove2), the pathfinding script would eventually crash.

Anyone have a high level or general Idea of what could have happened internally? The script didnt crash instantly, but after some time. It would happen , i think, when the ais were bunched up and triggering the shove.