Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-30-16, 10:24 AM   #1
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
artifact xp bar

this is my error, and i dont know how to fix it
-----------------------------------------------------------------------------------------------------
40x _Deranjata\modules\xpbar\artxp.lua:35: attempt to call global 'SetValue' (a nil value)
_Deranjata\modules\xpbar\artxp.lua:35: in function <_Deranjata\modules\xpbar\artxp.lua:22>

Locals:
self = derArtifactBar {
0 = <userdata>
}
event = "UNIT_INVENTORY_CHANGED"
showArtifact = true
itemID = 128866
altItemID = 128867
name = "Truthguard"
icon = 1272527
totalXP = 100
pointsSpent = 0
numPoints = 1
artifactXP = 0
xpForNextPoint = 300
(*temporary) = nil
(*temporary) = derArtifactBar {
0 = <userdata>
}
(*temporary) = 0
(*temporary) = "attempt to call global 'SetValue' (a nil value)"
------------------------------------------------------------------------
here is my code
Lua Code:
  1. derArtifactBar:RegisterEvent("PLAYER_ENTERING_WORLD")
  2. derArtifactBar:RegisterEvent("ARTIFACT_XP_UPDATE")
  3. derArtifactBar:RegisterEvent("UNIT_INVENTORY_CHANGED")
  4. derArtifactBar:SetScript("OnEvent", function(self, event, ...)
  5.         local showArtifact = HasArtifactEquipped()
  6.         if not showArtifact then
  7.             if self:IsShown() then
  8.                 self:Hide()
  9.             end
  10.             return
  11.         end
  12.         if not self:IsShown() then
  13.             self:Show()
  14.         end
  15.         local itemID, altItemID, name, icon, totalXP, pointsSpent = C_ArtifactUI.GetEquippedArtifactInfo()
  16.         local numPoints, artifactXP, xpForNextPoint = MainMenuBar_GetNumArtifactTraitsPurchasableFromXP(pointsSpent, totalXP)
  17.         SetValue(self, artifactXP/xpForNextPoint)
  18.     end)
my problem:

SetValue(self, artifactXP/xpForNextPoint)
is throwing an error for
derArtifactBar:SetScript("OnEvent", function(self, event, ...)
__________________

Last edited by Uitat : 08-30-16 at 10:37 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » artifact xp bar


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