FAQ/How to enable and disable script errors ("Lua errors")
In order to troubleshoot potential issues, particularly when the addon isn't loading correctly, you'll need to post any error messages Lua will display in the game. These are disabled by default in the most current client versions.
You can, however, enable them using this command:
/console scriptErrors 1
Once you're done reporting a problem, and no longer wish to see error messages, feel free to disable them with this command:
/console scriptErrors 0
Important: There is no confirmation after typing these commands, and you'll need to reload your interface or restart/relog to see the relevant error messages if Rarity failed to load.
Please understand that you're making it extremely difficult, if not impossible, for me to help you if you don't give me all the information that you can. The more I know about the specifics of a potential issue, the faster I'll be able to fix it, and the more likely it is to become a higher priority for me to do so.
-----
Note: If you'd like to collect and report script errors more easily to help addon authors out and/or get your addon problems fixed quickly, I recommend using specific addons to do so. Here are some good reasons for why you should consider this.
Original by Omegal (Tech Support MVP) - saved here in case the forums are shut down:
Honestly the best thing to do is to install buggrabber/bugsack
it replaces blizzard lua errors with better system.
1. duplicates of same error are not reported in additional popups. they are aggregated
2. popups do not occur when doing anything important such as in combat
3. popups can be disabled entirely if you'd rather manually open error report at leisure.
4. all errors are saved so you can actually go through them at any time and report them to addon authors or just diagnose them yourself to figure out what addons are erring when multiple are occurring
People hate blizzards error reports because they suck. are invasive and not intuitive at all. They block gameplay in most inconvenient times and are often dismissed and forgotten as a result.
So look up Bugsack and BugGrabber on curse (need both, one is the core other is GUI). Install. and now you can diagnose errors properly in future. yes you can just turn errors off but that's about as recommended as putting fingers in your ears and going "lalalalalala". your gameplay experience will suffer ignoring errors. So instead make the reporting better and tolerable.
Links:
Message: [string "--[==[ Error in 'Time left':'initialization..."]:87: attempt to perform arithmetic on field 'sanityReduction' (a nil value)
Time: Sun Jul 5 16:06:09 2020
Count: 8
Stack: [string "--[==[ Error in 'Time left':'initialization..."]:87: attempt to perform arithmetic on field 'sanityReduction' (a nil value)
[string "@Interface\AddOns\RCLootCouncil\Core\ErrorHandler.lua"]:134: in function <Interface\AddOns\RCLootCouncil\Core\ErrorHandler.lua:132>
[string "--[==[ Error in 'Time left':'initialization' ]==] return function() local SanityFromCloak = {
[6272]=.20,
[6273]=.20,
[6274]=.25,
[6275]=.25,
[6276]=.40,
[6277]=.40,
[6278]=.40,
[6279]=.45,
[6280]=.45,
[6281]=.50,
[6282]=.65,
[6283]=.65,
[6284]=.70,
[6285]=.75,
[6286]=.80,
[6577]=.80,
[6580]=.80,
[6583]=.80,
[6586]=.80,
[6589]=.80,
[6592]=.80,
[6595]=.80,
[6598]=.80,
[6601]=.80
}
local PossibleDrainLevels = {
6,
8,
12
}
function SecondsToClock(seconds)
local seconds = tonumber(seconds)
if seconds <= 0 then
return "00:00:00";
else
mins = string.format("%02.f", math.floor(seconds/60));
secs = string.format("%02.f", math.floor(seconds - mins *60));
return mins..":"..secs
end
end
function Round(num, numDecimalPlaces)
local mult = 10^(numDecimalPlaces or 0)
return math.floor(num * mult + 0.5) / mult
end
function GetItemSplit(itemLink)
local itemString = string.match(itemLink, "item:([%-?%d:]+)")
local itemSplit = {}
-- Split data into a table
for _, v in ipairs({strsplit(":", itemString)}) do
if v == "" then
itemSplit[#itemSplit + 1] = 0
else
itemSplit[#itemSplit + 1] = tonumber(v)
end
end
return itemSplit
end
function GetCloakResistance()
local itemLink = GetInventoryItemLink("player", 15)
if (itemLink) then
local itemSplit = GetItemSplit(itemLink)
local bonuses = {}
for index=1, itemSplit[13] do
bonuses[#bonuses + 1] = itemSplit[13 + index]
end
for _, bonus in pairs(bonuses) do
if (SanityFromCloak[bonus]) then
return SanityFromCloak[bonus]
end
end
end
end
function GetEffectiveDrain(diff)
local realDrain = diff / (1 - aura_env.sanityReduction)
local minDiff = math.huge
local closestLevel = 5
for _, level in ipairs(PossibleDrainLevels) do
local drainDiff = math.abs(realDrain - level)
if drainDiff < minDiff then
minDiff = drainDiff
closestLevel = level
end
end
return closestLevel * (1 - aura_env.sanityReduction)
end
function GetCacheAverage()
local sum = 0
local totalTicks = 0
for i, tick in pairs(aura_env.tickCache) do
if (tick and tick > 0) then
sum = sum + tick
end
totalTicks = totalTicks + 1
end
return sum / totalTicks
end
function ResetCache()
aura_env.tickCache = {}
end
function Reset()
aura_env.lastBigHit = 0
aura_env.lostToHits = 0
aura_env.remainingTime = 0
aura_env.sanityReduction = GetCloakResistance()
aura_env.tickCache = {}
aura_env.ticks = 1
end
Reset()
end"]:87: in function `GetEffectiveDrain'
[string "--[==[ Error in 'Sanity loss from hits' ]==] return function(event, ...)
if (event == "UNIT_POWER_FREQUENT") then
local unit, powerType = ...
if (unit == "player" and powerType == "ALTERNATE") then
local power = UnitPower(unit, 10, true)
if (aura_env.lastPower) then
local diff = aura_env.lastPower - power
if (diff <= 12 and diff ~= 0) then -- tick
local rollingAverage = GetCacheAverage()
if (math.abs(diff - rollingAverage) > 1) then
ResetC
Message: ...rface/AddOns/SUI/Modules/Skins/Addons/_Bartender.lua:8: attempt to index global 'BT4StatusBarTrackingManager' (a nil value)
Time: Tue Jun 11 11:45:25 2024
Count: 1
Stack: ...rface/AddOns/SUI/Modules/Skins/Addons/_Bartender.lua:8: attempt to index global 'BT4StatusBarTrackingManager' (a nil value)
[string "@Interface/AddOns/SUI/Modules/Skins/Addons/_Bartender.lua"]:8: in function <...rface/AddOns/SUI/Modules/Skins/Addons/_Bartender.lua:3>
[string "=[C]"]: ?
[string "@Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua"]:66: in function <...AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:61>
[string "@Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua"]:523: in function `EnableAddon'
[string "@Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua"]:536: in function `EnableAddon'
[string "@Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua"]:626: in function <...AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:611>
Locals: self = <table> {
SetDefaultModuleLibraries = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:363
Enable = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:290
NewModule = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:231
EnableModule = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:328
modules = <table> {
}
GetModule = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:206
IterateEmbeds = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:438
IsModule = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:213
defaultModuleLibraries = <table> {
}
SetEnabledState = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:420
enabledState = true
baseName = "SUI"
OnEnable = <function> defined @Interface/AddOns/SUI/Modules/Skins/Addons/_Bartender.lua:3
moduleName = "Skins.Bartender"
GetName = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:275
defaultModuleState = true
Disable = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:310
IterateModules = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:433
name = "SUI_Skins.Bartender"
SetDefaultModulePrototype = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:405
IsEnabled = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:447
orderedModules = <table> {
}
SetDefaultModuleState = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:383
DisableModule = <function> defined @Interface/AddOns/Bartender4/libs/AceAddon-3.0/AceAddon-3.0.lua:346
}
Bartender = true
(*temporary) = <function> defined =[C]:-1
(*temporary) = <table> {
}
(*temporary) = nil
(*temporary) = 1
(*temporary) = <table> {
1 = 0.300000
2 = 0.300000
3 = 0.300000
4 = 1
}
(*temporary) = <function> defined =[C]:-1
(*temporary) = <table> {
1 = 0.300000
2 = 0.300000
3 = 0.300000
}
(*temporary) = 3
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = 0.300000
(*temporary) = "attempt to index global 'BT4StatusBarTrackingManager' (a nil value)"