Results 1 to 10 of 20

Thread: [Tutorial][Work in progress] Hud elements

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Brigadier General
    Join Date
    Oct 2012
    Posts
    998
    Thanks
    20
    Thanked 590 Times in 390 Posts
    Quote Originally Posted by IzNoGoD View Post
    You either have to use endon or you have to check if self is defined, else you are trying to write to a client hud elem whilst the client is not defined anymore. The endon will be freed at the end of this loop, which only takes a second. I'd say, keep the endon.
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •