Results 1 to 3 of 3

Thread: logo destroy

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    logo destroy

    Hello

    Why Logorank1 is not destroy
    Who can help me ?

    Code:
    czolgowo()
    {
    
    	        if(self.rankc > 0)
                    {
    				self.logorank1 = newClientHudElem(self);
    				self.logorank1.x = 30;
    				self.logorank1.y = 30;
    				self.logorank1.alignX = "right";
    				self.logorank1.alignY = "middle";
    				self.logorank1.sort = -3;
    				self.logorank1.alpha = 1;
    				self.logorank1.fontScale = 1.3;
    				self.logorank1.archived = true;
    				self.logorank1.label = &"^1RANK";
                    }
    
    	        if(self.rankc > 5)
                    {
                       if(isDefined(self.logorank1))  self.logorank1 destroy();
    				self.logorank2 = newClientHudElem(self);
    				self.logorank2.x = 20;
    				self.logorank2.y = 20;
    				self.logorank2.alignX = "right";
    				self.logorank2.alignY = "middle";
    				self.logorank2.sort = -3;
    				self.logorank2.alpha = 1;
    				self.logorank2.fontScale = 1.3;
    				self.logorank2.archived = true;
    				self.logorank2.label = &"^2RANK";
                    }
    }

  2. #2
    Private
    Join Date
    Mar 2013
    Posts
    12
    Thanks
    2
    Thanked 6 Times in 5 Posts
    you forgot to use { } in third if, try this

    PHP Code:
    czolgowo()
    {

                if(
    self.rankc 0)
                    {
                    
    self.logorank1 newClientHudElem(self);
                    
    self.logorank1.30;
                    
    self.logorank1.30;
                    
    self.logorank1.alignX "right";
                    
    self.logorank1.alignY "middle";
                    
    self.logorank1.sort = -3;
                    
    self.logorank1.alpha 1;
                    
    self.logorank1.fontScale 1.3;
                    
    self.logorank1.archived true;
                    
    self.logorank1.label = &"^1RANK";
                    }

                if(
    self.rankc 5)
                    {
                    if(
    isDefined(self.logorank1))
                    { 
                    
    self.logorank1 destroy();
                    
    self.logorank2 newClientHudElem(self);
                    
    self.logorank2.20;
                    
    self.logorank2.20;
                    
    self.logorank2.alignX "right";
                    
    self.logorank2.alignY "middle";
                    
    self.logorank2.sort = -3;
                    
    self.logorank2.alpha 1;
                    
    self.logorank2.fontScale 1.3;
                    
    self.logorank2.archived true;
                    
    self.logorank2.label = &"^2RANK";
                    }
                    }


  3. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    What have you tried to debug yourself?

    I see a clear lack of any debugging in all of your code you post.

    Are you familiar with the purpose of debugging? It is to find why certain things are happening in the code. Add a few iprintlns on strategic locations in the code and try to debug it yourself.

Posting Permissions

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