Results 1 to 9 of 9

Thread: problem hud.size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    PHP Code:
    self.txt_hud[idestroy();
    self.txt_hud[i].name undefined
    you destroy the hud[i] here, hud[i] is now undefined and size is decreased
    however you set hud[i].name afterwards to undefined, therefore hud[i] is now more or less defined
    (since it holds the undefined membervariable name)

    PHP Code:
    self.txt_hud[idestroy(); 
    should do the trick, there is no need to set it to undefined

  2. The Following User Says Thank You to serthy For This Useful Post:

    sabixão (13th May 2014)

  3. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by serthy View Post
    PHP Code:
    self.txt_hud[idestroy();
    self.txt_hud[i].name undefined
    you destroy the hud[i] here, hud[i] is now undefined and size is decreased
    however you set hud[i].name afterwards to undefined, therefore hud[i] is now more or less defined
    (since it holds the undefined membervariable name)

    PHP Code:
    self.txt_hud[idestroy(); 
    should do the trick, there is no need to set it to undefined
    That is my code he is using, and I have found through experience that you have to undefine self.txt_hud.name once you have removed the element.

    Other than that, it works perfectly fine. There is no need to further reduce sizes.

  4. The Following User Says Thank You to Tally For This Useful Post:

    sabixão (13th May 2014)

Posting Permissions

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