Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-30-09, 08:21 AM   #1
cormanthor
A Warpwood Thunder Caller
 
cormanthor's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2008
Posts: 97
scripting troubles

I am trying to get a script working, but I'm running into a couple of issues. The purpose of the script is to display my talent spec on my unit frame, and my target's (player only) spec on their unit frame. Example

Code:
Demonology
0/56/15
The data is good, and the format is right. But my issues are:

1) The script I have is not printing anything on my UF.
2) The script is printing my mouseover's spec on my target's UF

Any pointers, or is #2 "working as intended"?

Code:
text = ""
spec = ""
tree = ""
high = 0
if UnitIsUnit(uid, "player") then
    for i=1,GetNumTalentTabs() do
        name, _, points, _ = GetTalentTabInfo(i)
        if points > high then
            tree = name
            high = points
        end
        if i == 2 then
            spec = spec .. "/" .. points .. "/"
        else
            spec = spec .. points
        end
    end 
elseif UnitIsPlayer(uid) then
    for i=1,GetNumTalentTabs(true) do
        name, _, points, _ = GetTalentTabInfo(i,true)
        if points > high then
            tree = name
            high = points
        end
        if i == 2 then
            spec = spec .. "/" .. points .. "/"
        else
            spec = spec .. points
        end
    end 
end
text = tree .. "\n" .. spec
__________________
Some days it's just not worth chewing through the restraints...
  Reply With Quote
 

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » scripting troubles


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