"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
In my opinion it is better to use a check for defined entity. An endon() will kill a for() count after the first loop through but if the player leaves the server before the 1st count is complete it is likely to throw an "undefined is not an entity" error anyway. I've had that happen to me many times. It would have been helpful if the endon() function killed for() counts during the loop, and not after it has run its course. But that is not the case.
I warn people about the mis-use of endon() functions as a matter of course because if you have a big mod it is very easy to hit the max number. The COD2 stock files already use a lot anyway. It doesn't give the modder much to play with.
Last edited by Tally; 23rd September 2014 at 08:41.
This might be the case in many other pieces of code, but as the wait is at the end of the loop, this will not happen, as cod2 runs on a frame-by-frame basis, and you cannot disconnect mid-frame.
Edit: above is true for checking for defined(), but not true for endon. Endon will work properly.
But like tally is saying, max variables might be an issue, especially on servers filled with players.
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
pollo (23rd September 2014)