local _, killingBlows, _, deaths, _, _, _, _, _, _, _, _ = GetBattlefieldScore(1)
local frame = CreateFrame("Frame", "KDTrackerFrame", UIParent)
frame:SetPoint("BOTTOM",-268,0)
frame:SetSize(80,130)
frame.text = frame:CreateFontString(nil, "ARTWORK")
frame.text:SetFont("Fonts\\FRIZQT__.ttf", 12, "OUTLINE")
frame.text:SetPoint("CENTER",frame,-10,25)
frame.text:SetText("Kills: "..killingBlows)
frame.text2 = frame:CreateFontString(nil, "ARTWORK")
frame.text2:SetFont("Fonts\\FRIZQT__.ttf", 12, "OUTLINE")
frame.text2:SetPoint("CENTER",frame,-8,-25)
frame.text2:SetText("Tode: "..deaths)
frame = CreateBackdropFrame(KDTrackerFrame, 80, 130, "CENTER", 0, 0)
KDTrackerFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
KDTrackerFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_ENTERING_WORLD" then
if select(2, IsInInstance()) == "pvp" then
self:Show()
else
self:Hide()
end
end
end)
local PlayerIndex = 0;
local lName, lKillingBlows, _, lDeaths = GetBattlefieldScore(PlayerIndex);
local UpdateDelay = 5;
local UpdateCount = 0;
function OnUpdate(self, ...)
UpdateCount = UpdateCount + 1;
if UpdateCount == UpdateDelay then
local lNumScores = GetNumBattlefieldScores()
local lName = GetBattlefieldScore(PlayerIndex);
if not lName == UnitName('player') then
for i = 1, lNumScores do
local lName = GetBattlefieldScore(i);
if lName == UnitName('player') then
PlayerIndex = i;
break;
end;
end;
end;
local lName, lKillingBlows, _, lDeaths = GetBattlefieldScore(PlayerIndex);
frame.text:SetText("Kills: "..lKillingBlows)
frame.text2:SetText("Tode: "..lDeaths)
UpdateCount = 0;
end;
end;
local frame = CreateFrame("Frame", "KDTrackerFrame", UIParent)
frame:SetPoint("BOTTOM",-268,0)
frame:SetSize(80,130)
frame:SetScript("OnUpdate", OnUpdate);
frame = CreateBackdropFrame(KDTrackerFrame, 80, 130, "CENTER", 0, 0)
frame.text = frame:CreateFontString(nil, "ARTWORK")
frame.text:SetFont("Fonts\\FRIZQT__.ttf", 12, "OUTLINE")
frame.text:SetPoint("CENTER",frame,-10,25)
frame.text:SetText("Kills: "..lKillingBlows)
frame.text2 = frame:CreateFontString(nil, "ARTWORK")
frame.text2:SetFont("Fonts\\FRIZQT__.ttf", 12, "OUTLINE")
frame.text2:SetPoint("CENTER",frame,-8,-25)
frame.text2:SetText("Tode: "..lDeaths)
KDTrackerFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
KDTrackerFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_ENTERING_WORLD" then
if select(2, IsInInstance()) == "pvp" then
self:Show()
else
self:Hide()
end
end
end)
Message: Interface\AddOns\Test\BackgroundArt.lua:74: 'then' expected near '='
Time: 05/17/12 00:37:38
Count: 1
Stack:
Locals:
if UpdateCount = UpdateDelay then
if UpdateCount == UpdateDelay then
local NumScores = GetNumBattlefieldScores()
local total = 0
KDTrackerFrame:SetScript("OnUpdate", function(self, elapsed)
total = total + elapsed
if total > 1 then
for i = 1, NumScores do
local name, killingBlows, _, deaths = GetBattlefieldScore(i)
if ( name == UnitName("player") ) then
KDTrackerFrame.text:SetText("Kills: "..killingBlows)
KDTrackerFrame.text2:SetText("Tode: "..deaths)
total = 0
end
end
end
end)
KDTrackerFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
KDTrackerFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_ENTERING_WORLD" then
if select(2, IsInInstance()) == "pvp" then
self:Show()
else
self:Hide()
end
end
end)
local NumScores = GetNumBattlefieldScores()
if not lName == UnitName('player') then for i = 1, lNumScores do local lName = GetBattlefieldScore(i); if lName == UnitName('player') then PlayerIndex = i; break; end; end; end;
Die Waffe aber. Und dadrum gehts mir ja