Thursday, April 12, 2012

Addon xml-->lua.OnUpdate error

[:1]Hello.

Worser replace XML LUA addon but an error on wow.

Arcanum \ ArcanumSphere.lua: 61: Attempt to call global.

'Arcanum_OnUpdate' (A nil value)

I am not very good.

Need help.Thanks

local frame = CreateFrame("Button", "ArcanumButton",UIParent,"SecureActionButtonTemplate")

frame:SetToplevel(true)

frame:SetMovable(true)

frame:EnableMouse(true)

frame:SetWidth(64)

frame:SetHeight(64)

frame:ClearAllPoints()

frame:SetPoint("CENTER", "UIParent", "CENTER", 0, -100)



local texture = frame:CreateTexture("ArcanumButtonTexture", "BACKGROUND")

texture:Show()

texture:SetWidth(64)

texture:SetHeight(64)

texture:ClearAllPoints()

texture:SetPoint("CENTER", "ArcanumButton", "CENTER", 0, 0)

texture = frame:CreateTexture("ArcanumButtonTexture2", "BORDER")

texture:SetWidth(44)

texture:SetHeight(44)

texture:ClearAllPoints()

texture:SetPoint("CENTER", "ArcanumButton", "CENTER", 0, 0)



texture = frame:CreateTexture("ArcanumButtonTexture3", "ARTWORK")

texture:SetWidth(64)

texture:SetHeight(64)

texture:ClearAllPoints()

texture:SetPoint("CENTER", "ArcanumButton", "CENTER", 0, 0)



fontString = frame:CreateFontString("ArcanumButtonText", nil, "GameFontNormal")

fontString:SetTextColor(1.0, 1.0, 1.0, 1)

fontString:ClearAllPoints()

fontString:SetPoint("CENTER", "ArcanumButton", "CENTER", 0, 0)





frame:SetScript("OnLoad", function()

Arcanum_OnLoad();

end)

frame:SetScript("OnEnter", function()

Arcanum_BuildTooltip(this,"ANCHOR_CURSOR","Main");

end)

frame:SetScript("OnLeave", function()

GameTooltip:Hide()

end)

frame:SetScript("OnDragStart", function()

Arcanum_OnDragStart(this);

end)

frame:SetScript("OnDragStop", function()

Arcanum_OnDragStop(this);

end)

frame:SetScript("OnMouseUp", function()

Arcanum_OnDragStop(this);

end)

--61 frame:SetScript("OnUpdate", function()

Arcanum_OnUpdate(this, 0.1);

end)

frame:SetScript("OnEvent", function()

Arcanum_OnEvent(event);

end)

Fonction:

Arcanum_UpdateInterval = 1.0; -- How often the OnUpdate code will run (in seconds)

function Arcanum_OnUpdate(self, elapsed)

self.TimeSinceLastUpdate = self.TimeSinceLastUpdate + elapsed;

if (self.TimeSinceLastUpdate > Arcanum_UpdateInterval) then

--Si c'est la premiere update on initialize

if Loaded == false then

Arcanum_Initialize();

Loaded = true;

end

if FrenchClass == "MAGE" then

Arcanum_MenuFading();

Arcanum_DisplayFading();

ArcanumT = ArcanumT + arg1;

if ArcanumT >= ArcanumButtonDisplayT then

ArcanumButtonDisplayT = ArcanumButtonDisplayT + 0.5;

Arcanum_Cooldown();

ArcanumButton_TextDisplay();

end



if ArcanumT >= ArcanumButtonDisplayTimer then

ArcanumButton_ImageDisplay();

ArcanumT = 0;

ArcanumButtonDisplayT = 1;

end



if ArcanumTradeAccept == true then

ArcanumTradeAcceptT = ArcanumTradeAcceptT + arg1

if ArcanumTradeAcceptT > ArcanumTradeAcceptTimer then

ArcanumTradeAccept = false

--~ AcceptTrade();

end

end



if IceblockDone == true then

IceblockCounter = IceblockCounter + arg1;

if IceblockCounter >= 3 then

IceblockReady = true;

IceblockCounter = 0;

end

end



-- On met jour la localisation du joueur

PlayerZone = GetRealZoneText();

end



self.TimeSinceLastUpdate = 0;

end

end|||Error xml.

No comments:

Post a Comment