
Cell/Indicators/Base.lua:99: attempt to perform arithmetic on field 'elapsed' (a nil value)
Neviskio opened this issue ยท 1 comments
Heya been getting this error, I installed cell today with cell unit frames, I imported automaticjak (his pastebin from the website in UI section https://pastebin.com/K5U9uHS3 ) profile but I get this error and it kinda breaks the UI in various ways. I have to reload to fix it. I'm not sure what is causing it but I assume some borked indicator but I cannot find a fix <.<. I triggered it for example when switching on my paladin from holy to retribution spec or sometimes in a party with followers (retri spec again if it helps). Would be willing to give more details but not sure what is needed for the bug report to help besides the error.
Cell/Indicators/Base.lua:99: attempt to perform arithmetic on field 'elapsed' (a nil value)
[string "@Cell/Indicators/Base.lua"]:99: in function <Cell/Indicators/Base.lua:98>
Locals:
self = StatusBar {
spark = Texture {
}
PixelSnapDisabled = true
points =
}
icon = Texture {
}
}
elapsed = 0.012000
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on field 'elapsed' (a nil value)"
This is my export profile https://pastebin.com/VuKuzQYw hopefully I made it correctly, not used pastebin in a while o.o
Been tinkering with this since I found issue 280 this issue today, reading through it I started tinkering since VerticalCooldown_OnUpdate seems sometimes loads before VerticalCooldown_ShowCooldown (or so jared seems to have found out). I did a very dirty horribad code bit that maybe does something. Problem is I'm not a lua programmer, just someone that has some experience with tinkering with lua, this feels wrong but I've been testing for a while (joining/quitting follower dungeons where it used to trigger reliably) and it doesn't return the error, for now... It's surely not the fix but, I might leave it here if in the next few hours I don't get the error anymore. My thinking has been "I cannot finnd a way to get the variable sorted in time, but I can hack a way in to make sure if OnUpdate loads before ShowCooldown at least it's not nil!".
local function VerticalCooldown_OnUpdate(self, elapsed)
if self.elapsed == nil then
self.elapsed = 0.1 -- update immediately
end
self.elapsed = self.elapsed + elapsed
if self.elapsed >= 0.1 then
self:SetValue(self:GetValue() + self.elapsed)
self.elapsed = 0
end
end
I wouldn't say I recommend this to anyone but... I think it kinda puts a bandaid on the error in case it bothers anyone? I am not sure I would make a pull request with this hack but hell maybe later <.<