Forum > Serverside Modding

Talents

<< < (4/5) > >>

glararan:
Ok when i got four talent trees i go to DBC TalentTab.dbc on Columm 24 is Name WarriorArms RogueAssasins...now when i searching in MPQ i will search in TALENTFRAME Pictures i create new pictures with my name of name in Columm 24 so...HunterTroll i create four images ...

--- Code: ---HunterTroll-BottomLeft.blp
HunterTroll-BottomRight.blp
HunterTroll-TopLeft.blp
HunterTroll-TopRight.blp

--- End code ---
Now i go to WoW and i receive error:

--- Code: ---Date: 2011-04-24 13:00:26
ID: 1
Error occured in: Global
Count: 1
Message: ..FrameXMLUIPanelTemplates.lua line 20:
   attempt to index local 'tab' (a nil value)
Debug:
   [C]: ?
   ..FrameXMLUIPanelTemplates.lua:20: PanelTemplates_UpdateTabs()
   ..FrameXMLUIPanelTemplates.lua:8: PanelTemplates_SetTab()
   ...rfaceAddOnsBlizzard_TalentUIBlizzard_TalentUI.lua:997: PlayerSpecTab_OnClick()
   ...rfaceAddOnsBlizzard_TalentUIBlizzard_TalentUI.lua:296:
      ...rfaceAddOnsBlizzard_TalentUIBlizzard_TalentUI.lua:287
   [C]: Show()
   ..FrameXMLUIParent.lua:1580: SetUIPanel()
   ..FrameXMLUIParent.lua:1424: ShowUIPanel()
   ..FrameXMLUIParent.lua:1311:
      ..FrameXMLUIParent.lua:1307
   [C]: SetAttribute()
   ..FrameXMLUIParent.lua:1974: ShowUIPanel()
   ...rfaceAddOnsBlizzard_TalentUIBlizzard_TalentUI.lua:102: PlayerTalentFrame_Toggle()
   ..FrameXMLUIParent.lua:366: ToggleTalentFrame()
   [string "TOGGLETALENTS"]:1:
      [string "TOGGLETALENTS"]:1

--- End code ---

UIPanelTemplates.liua:

--- Code: ---function PanelTemplates_SetTab(frame, id)
frame.selectedTab = id;
PanelTemplates_UpdateTabs(frame);       [color=#00FF00]/// LINE 8[/color]
end




function PanelTemplates_UpdateTabs(frame)
if ( frame.selectedTab ) then
local tab;
for i=1, frame.numTabs, 1 do
tab = _G[frame:GetName().."Tab"..i];
if ( tab.isDisabled ) then                [color=#00FF00] // LINE 20[/color]
PanelTemplates_SetDisabledTabState(tab);
elseif ( i == frame.selectedTab ) then
PanelTemplates_SelectTab(tab);
else
PanelTemplates_DeselectTab(tab);
end
end
end
end

--- End code ---

Blizzard_TalentUI:

--- Code: ---function PlayerTalentFrame_OnShow(self)        [color=#00FF00]// LINE 286[/color]
-- Stop buttons from flashing after skill up
SetButtonPulse(TalentMicroButton, 0, 1);

PlaySound("TalentScreenOpen");
UpdateMicroButtons();

if ( not selectedSpec ) then
-- if no spec was selected, try to select the active one
PlayerSpecTab_OnClick(activeSpec and specTabs[activeSpec] or specTabs[DEFAULT_TALENT_SPEC]);       [color=#00FF00] // LINE 296[/color]
else
PlayerTalentFrame_Refresh();
end




if ( not PanelTemplates_GetSelectedTab(PlayerTalentFrame) ) then
PanelTemplates_SetTab(PlayerTalentFrame, PlayerTalentTab_GetBestDefaultTab(specIndex));       [color=#00FF00] // LINE 997[/color]
end



function PlayerTalentFrame_Toggle(pet, suggestedTalentGroup)
local hidden;
local talentTabSelected = PanelTemplates_GetSelectedTab(PlayerTalentFrame) ~= GLYPH_TALENT_TAB;
if ( not PlayerTalentFrame:IsShown() ) then
ShowUIPanel(PlayerTalentFrame);        [color=#00FF00] // LINE 102[/color]
hidden = false;
else
local spec = selectedSpec and specs[selectedSpec];
if ( spec and talentTabSelected ) then
-- if a talent tab is selected then toggle the frame off
HideUIPanel(PlayerTalentFrame);
hidden = true;
else
hidden = false;
end
end

--- End code ---


UIParent.lua:

--- Code: --- if ( frame ) then
frame:Show();                  [color=#00FF00] // LINE 1580[/color]
-- Hide all child windows
securecall("CloseChildWindows");
end
end



local leftFrame = self:GetUIPanel("left");
if ( not leftFrame ) then
self:SetUIPanel("left", frame);              [color=#00FF00]// LINE 1424[/color]
return;
end
local leftPushable = GetUIPanelWindowInfo(leftFrame, "pushable") or 0;







local function FramePositionDelegate_OnAttributeChanged(self, attribute) [color=#00FF00]// LINE 1307[/color]
if ( attribute == "panel-show" ) then
local force = self:GetAttribute("panel-force");
local frame = self:GetAttribute("panel-frame");
self:ShowUIPanel(frame, force);               [color=#00FF00]// LINE 1311[/color]
elseif ( attribute == "panel-hide" ) then
local frame = self:GetAttribute("panel-frame");
local skipSetPoint = self:GetAttribute("panel-skipSetPoint");
self:HideUIPanel(frame, skipSetPoint);
elseif ( attribute == "panel-update" ) then
local frame = self:GetAttribute("panel-frame");
self:UpdateUIPanelPositions(frame);
elseif ( attribute == "uiparent-manage" ) then
self:UIParentManageFramePositions();
end
end



-- Dispatch to secure code
FramePositionDelegate:SetAttribute("panel-force", force);
FramePositionDelegate:SetAttribute("panel-frame", frame);
FramePositionDelegate:SetAttribute("panel-show", true);    [color=#00FF00]// LINE 1974[/color]
end




TalentFrame_LoadUI();
if ( PlayerTalentFrame_Toggle ) then
PlayerTalentFrame_Toggle(false, GetActiveTalentGroup());    [color=#00FF00] // LINE 366[/color]
end
end

--- End code ---

schlumpf:
The only relevant part is "tab = _G[frame:GetName().."Tab"..i];". This needs to be existing, which is not. You need to have a frame called like that, which you don't.

glararan:
Can you write me full script?Please. I'm n00b in Lua.

schlumpf:
No, I can't.

glararan:
:( Can anyone?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version