Thread Tools Display Modes
12-02-10, 11:25 AM   #1
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
names not showing up.

Code:
if(unit == 'target' or unit == 'player' or unit == 'targettarget' or unit == 'focus' or unit == 'pet' or unit == 'focustarget' or unit == 'party') then
	    
	   local Name = health:CreateFontString(nil, 'OVERLAY')
	    Name:SetFont(font, 15, 'THINOUTLINE')
                    Name:SetHeight(25)
		
		if(unit == 'player') then
		    Name:Hide()
		end
		
		if(unit == 'target')then
		    Name:SetPoint('LEFT', health, 'LEFT', -5, 26)
		    Name:SetWidth(300)
	        Name:SetJustifyH'LEFT'
		    self:Tag(self.Name,'[difficulty][level][shortclassification] [raidcolor][AfterName]')
	    end
	
	    if(unit == 'targettarget' or unit == 'focus' or unit == 'pet' or unit =='focustarget' or unit == 'party') then
		    Name:SetPoint('CENTER')
		    Name:SetWidth(150)
		    self:Tag(self.Name, '[raidcolor][AfterName] [happiness]')
	    end
		
	   self.Name = Name
         end
the names is just not showing up, for some wiered reason, no LUA errors..

full code:http://pastebin.com/LsSafMrt
  Reply With Quote
12-02-10, 12:56 PM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Where is AfterName implemented?
__________________
「貴方は1人じゃないよ」
  Reply With Quote
12-02-10, 01:25 PM   #3
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
In my Aftermathhtags.lua
  Reply With Quote
12-02-10, 01:35 PM   #4
Lyelu
A Cyclonian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 44
Code:
if unit then
	    
  self.Name = health:CreateFontString(nil, 'OVERLAY')
  self.Name:SetFont(font, 15, 'THINOUTLINE')

  if(unit == 'player') then
         self.Name:Hide()
  elseif(unit == 'target')then
	self.Name:SetPoint('LEFT', health, 'LEFT', -5, 26)
	self.Name:SetJustifyH'LEFT'
	self:Tag(self.Name,'[difficulty][level][shortclassification] [raidcolor][AfterName]')
        self.Name:Show()
  elseif (unit == 'targettarget' or unit == 'focus' or unit == 'pet' or unit =='focustarget' or unit == 'party') then
	self.Name:SetPoint('CENTER')
        self.Name:SetWidth(150)
	self:Tag(self.Name, '[raidcolor][AfterName] [happiness]')
 end
		
end
Maybe try something more like that?

Make sure then you've passed "self" into the function, like:
"local function SomeFancyName(self)".
  Reply With Quote
12-02-10, 01:42 PM   #5
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
That's almost how i had it before, but i want it this way, cause its more understandable, and the other way is just confusing abit

----------- old code ------------

Code:
	if(unit~='player')then
		local name = hp:CreateFontString(nil, 'OVERLAY')
		if(unit == 'targettarget' or unit == 'focus' or unit == 'pet' or unit =='focustarget' or unit == 'party') then
			name:SetPoint('CENTER')
			name:SetWidth(150)
		else
			name:SetPoint('LEFT', hp, 'LEFT', -1, 27)
			name:SetWidth(300)
			name:SetJustifyH'LEFT'
		end
		name:SetFont(font, 15, 'THINOUTLINE')
		name:SetHeight(15)
		self.Info = name
		if(unit == 'target')then
			self:Tag(self.Info,'[difficulty][level][shortclassification] [raidcolor][AfterName]')
		else
			self:Tag(self.Info,'[raidcolor][name]')
		end
	end
  Reply With Quote
12-02-10, 02:29 PM   #6
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Its working now, thanks.. dont really know what error was, but this works

Code:
	if unit then
	    
        self.Name = health:CreateFontString(nil, 'OVERLAY')
        self.Name:SetFont(font, 15, 'THINOUTLINE')

        if(unit == 'player') then
            self.Name:Hide()
		end
		
        if(unit == 'target')then
	        self.Name:SetPoint('LEFT', health, 'LEFT', -5, 26)				
	        self.Name:SetJustifyH'LEFT'
	        self:Tag(self.Name,'[difficulty][level][shortclassification] [raidcolor][AfterName]')
		end
		
        if(unit == 'targettarget' or unit == 'focus' or unit == 'pet' or unit =='focustarget' or unit == 'party') then
	        self.Name:SetPoint('CENTER')
            self.Name:SetWidth(150)
	        self:Tag(self.Name, '[raidcolor][AfterName] [happiness]')
        end
	
    end
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » names not showing up.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off