Advanced Scrolling Combat Text

Advanced Scrolling Combat Text

162k Downloads

ASCT errors when savedvariables are empty on WotLK Classic

b-morgan opened this issue ยท 10 comments

commented

After installing ASCT 8.9.5 for the first time the first login will generate errors. Logout and Login and the errors are gone.

Unfortunately, I was debugging my own addon (Skillet-Classic) so I lost the BugGrabber output.

commented

Change SCT_Check.lua to (i.e. add three lines):

local L = ASDC_LOCALE_TABLE
local function OnEvent(self, event, isLogin, isReload)
	if isLogin or isReload then
	if not Advanced_Scrolling_Combat_Text_DB then
		Advanced_Scrolling_Combat_Text_DB = {}
	end
	local Comabt_Text = C_CVar.GetCVarBool("enableFloatingCombatText")
    if Comabt_Text == false then
    message(L["Message"])
    end
	end
end
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", OnEvent)
commented

Oh that's been a bug I've been trying to fix forever! Thanks for the update. Has to do something with the add and delete variables function most likely. And there might be an onload error to.

commented

I was able to reproduce. Just deleted the character specific saved variables file(s) and login.

The first login generates 10 errors. Most of them caused by referencing Advanced_Scrolling_Combat_Text_DB before it is defined which apparently gets defined later on so the bug disappears. I've included a zip file with all the errors and then pasted a couple of them directly.

!BugGrabber.zip

1x ...Gains_Losses/Resource_Losses/Resource_Loss-WOTLK.lua:20: attempt to index global 'Advanced_Scrolling_Combat_Text_DB' (a nil value)
[string "@Advanced_Scrolling_Combat_Text/Gains_Losses/Resource_Losses/Resource_Loss-WOTLK.lua"]:20: in function <...Gains_Losses/Resource_Losses/Resource_Loss-WOTLK.lua:9>

Locals:
Comabt_Text = true
(*temporary) = nil
(*temporary) = "enableFloatingCombatText"
(*temporary) = true
(*temporary) = 0
(*temporary) = "MANA"
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index global 'Advanced_Scrolling_Combat_Text_DB' (a nil value)"
power = "Mana"
L = <table> {
 Windwalker = "Windwalker"
 Shadow = "Shadow"
 Unholy = "Unholy"
 msg = "is now ready!"
 Unlearned Skills = "Unlearned Skills"
 Sent Mail = "Sent Mail"
 Colors for Fading Auras = "Colors for Fading Auras"
 Shared Spell cd's = "Shared Spell cd's"
 Frost Resistance = "Frost Resistance"
 Fury = "Fury"
 Nothing = "Nothing"
 Enhancement = "Enhancement"
 Warlock = "Warlock"
 Leveling = "Leveling"
 Trinket 1 = "Trinket 1"
 Inventory full = "Inventory full"
 Protection = "Protection"
 Stats = "Stats"
 Fading Buffs Alert = "Fading Buffs Alert"
 Block Rating = "Block Rating"
 War mode On = "War mode On"
 Traps = "Traps"
 Resource lost = "Resource lost"
 Lost = "Lost"
 Racials_Priest = "Racials_Priest"
 Restoration = "Restoration"
 Armor lost = "Armor lost"
 Havoc = "Havoc"
 Friends come Online = "Friends come Online"
 Stamina = "Stamina"
 Level up message = "Level up message"
 Combat = "Combat"
 Zone discovery = "Zone discovery"
 Color Picker Spells = "Colors for Spells"
 skill = "skill"
 Unsupported_Line_5 = "Advanced Scrolling Combat Text not loaded!"
 Agility = "Agility"
 You lost = "You lost"
 Experience Gains = "Experience Gains"
 Hit Rating = "Hit Rating"
 Insanity = "Insanity"
 Astral Power = "Astral Power"
 Marksmanship = "Marksmanship"
 Defense Rating = "Defense Rating"
 Title_SARTE = "Scrolling Ability Text"
 Health = "Health"
 Disable = "Disable"
 Group Invites = "Group Invites"
 Money Gains = "Money Gains"
 Locked Items = "Locked Items"
 You have gained the = "You have gained the"
 Not Enough Honor Points = "Not Enough Honor Points"
 Pvp Off = "Pvp Off"
 Reset Class = "Reset Class"
 Feral_Combat = "Feral_Combat"
 Haste Rating = "Haste Rating"
 Runic Power = "Runic Power"
 Preservation = "Preservation"
 Has challenged you to a duel. = "Has challenged you to a duel."
 Brewmaster = "Brewmaster"
 Shocks = "Shocks"
 Rested = "Rested"
 Trinket Slot Two = "The second trinket in slot 14."
 Dungeon Difficulty Changed = "Dungeon Difficulty Changed"
 Mana = "Mana"
 Trinket 2 = "Trinket 2"
 msg_Lust = " Lust is now ready!"
 msg_Traps = " Traps are now ready!"
 Achievement Gains = "Achievement Gains"
 Retribution = "Retribution"
 Rage = "Rage"
 Discipline = "Discipline"
 Color Picker Leveling = "Colors for Leveling"
 Buff has 5 seconds left = "Buff has 5 seconds left"
 Skill Up = "Skill Up"
 Mage = "Mage"
 Strength = "Strength"
 Devastation = "Devastation"
 Armor Penetration = "Armor Penetration"
 Priest = "Priest"
 Trinket Slot One Info = "Announces when your first trinket comes off cooldown."
 Trinket Slot One = "The first trinket in slot 13."
 Trinkets = "Trinkets"
 Color Picker = "Color Picker"
 Hunter = "Hunter"
 Skill Gained = "Skill Gained"
 Player joins your group = "Player joins your group"
 Keep Enabled = "Keep Enabled"
 Death Quadrants = "Death Quadrants"
 Spirit = "Spirit"
 Armor = "Armor"
 Unsupported_Line_1 = "You're running Advanced Scrolling Combat Text in an Unsupported game Version."
 Frost = "Frost"
 Spell Power = "Spell Power"
 Unsupported_Line_2 = "The Addon does not work on Private Servers."
 Is About to Fade! = "Is About to Fade!"
 Congratulations = "Congratulations"
 Icon = "Icon"
 Dodge Rating = "Dodge Rating"
 Items Looted = "Items Looted"
 Money Lost = "Money Lost"
 Expertise Rating = "Expertise Rating"
 Critical Strike Rating = "Critical Strike Rating"
 Focus = "Focus"
 Maelstrom = "Maelstrom"
 Fading Debuffs Alert = "Fading Debuffs Alert"
 Pvp On = "Pvp On"
 Advanced Scrolling Combat Text successfully Loaded. To load the options panel. Type /ASCT or click the mini map Icon. = "Advanced Scrolling Combat Text successfully Loaded. To load the options panel. Type /ASCT or click the mini map Icon."
 Holy Power = "Holy Power"
 Title = "Advanced Scrolling Combat text"
 Features = "Features"
 Racials = "Racials"
 Natur
1x ...lling_Combat_Text/Gains_Losses/Spell Penetration.lua:9: attempt to index global 'Advanced_Scrolling_Combat_Text_DB' (a nil value)
[string "@Advanced_Scrolling_Combat_Text/Gains_Losses/Spell Penetration.lua"]:9: in function <...lling_Combat_Text/Gains_Losses/Spell Penetration.lua:8>

Locals:
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index global 'Advanced_Scrolling_Combat_Text_DB' (a nil value)"
lastStat = -1
L = <table> {
 Windwalker = "Windwalker"
 Shadow = "Shadow"
 Unholy = "Unholy"
 msg = "is now ready!"
 Unlearned Skills = "Unlearned Skills"
 Sent Mail = "Sent Mail"
 Colors for Fading Auras = "Colors for Fading Auras"
 Shared Spell cd's = "Shared Spell cd's"
 Frost Resistance = "Frost Resistance"
 Fury = "Fury"
 Nothing = "Nothing"
 Enhancement = "Enhancement"
 Warlock = "Warlock"
 Leveling = "Leveling"
 Trinket 1 = "Trinket 1"
 Inventory full = "Inventory full"
 Protection = "Protection"
 Stats = "Stats"
 Fading Buffs Alert = "Fading Buffs Alert"
 Block Rating = "Block Rating"
 War mode On = "War mode On"
 Traps = "Traps"
 Resource lost = "Resource lost"
 Lost = "Lost"
 Racials_Priest = "Racials_Priest"
 Restoration = "Restoration"
 Armor lost = "Armor lost"
 Havoc = "Havoc"
 Friends come Online = "Friends come Online"
 Stamina = "Stamina"
 Level up message = "Level up message"
 Combat = "Combat"
 Zone discovery = "Zone discovery"
 Color Picker Spells = "Colors for Spells"
 skill = "skill"
 Unsupported_Line_5 = "Advanced Scrolling Combat Text not loaded!"
 Agility = "Agility"
 You lost = "You lost"
 Experience Gains = "Experience Gains"
 Hit Rating = "Hit Rating"
 Insanity = "Insanity"
 Astral Power = "Astral Power"
 Marksmanship = "Marksmanship"
 Defense Rating = "Defense Rating"
 Title_SARTE = "Scrolling Ability Text"
 Health = "Health"
 Disable = "Disable"
 Group Invites = "Group Invites"
 Money Gains = "Money Gains"
 Locked Items = "Locked Items"
 You have gained the = "You have gained the"
 Not Enough Honor Points = "Not Enough Honor Points"
 Pvp Off = "Pvp Off"
 Reset Class = "Reset Class"
 Feral_Combat = "Feral_Combat"
 Haste Rating = "Haste Rating"
 Runic Power = "Runic Power"
 Preservation = "Preservation"
 Has challenged you to a duel. = "Has challenged you to a duel."
 Brewmaster = "Brewmaster"
 Shocks = "Shocks"
 Rested = "Rested"
 Trinket Slot Two = "The second trinket in slot 14."
 Dungeon Difficulty Changed = "Dungeon Difficulty Changed"
 Mana = "Mana"
 Trinket 2 = "Trinket 2"
 msg_Lust = " Lust is now ready!"
 msg_Traps = " Traps are now ready!"
 Achievement Gains = "Achievement Gains"
 Retribution = "Retribution"
 Rage = "Rage"
 Discipline = "Discipline"
 Color Picker Leveling = "Colors for Leveling"
 Buff has 5 seconds left = "Buff has 5 seconds left"
 Skill Up = "Skill Up"
 Mage = "Mage"
 Strength = "Strength"
 Devastation = "Devastation"
 Armor Penetration = "Armor Penetration"
 Priest = "Priest"
 Trinket Slot One Info = "Announces when your first trinket comes off cooldown."
 Trinket Slot One = "The first trinket in slot 13."
 Trinkets = "Trinkets"
 Color Picker = "Color Picker"
 Hunter = "Hunter"
 Skill Gained = "Skill Gained"
 Player joins your group = "Player joins your group"
 Keep Enabled = "Keep Enabled"
 Death Quadrants = "Death Quadrants"
 Spirit = "Spirit"
 Armor = "Armor"
 Unsupported_Line_1 = "You're running Advanced Scrolling Combat Text in an Unsupported game Version."
 Frost = "Frost"
 Spell Power = "Spell Power"
 Unsupported_Line_2 = "The Addon does not work on Private Servers."
 Is About to Fade! = "Is About to Fade!"
 Congratulations = "Congratulations"
 Icon = "Icon"
 Dodge Rating = "Dodge Rating"
 Items Looted = "Items Looted"
 Money Lost = "Money Lost"
 Expertise Rating = "Expertise Rating"
 Critical Strike Rating = "Critical Strike Rating"
 Focus = "Focus"
 Maelstrom = "Maelstrom"
 Fading Debuffs Alert = "Fading Debuffs Alert"
 Pvp On = "Pvp On"
 Advanced Scrolling Combat Text successfully Loaded. To load the options panel. Type /ASCT or click the mini map Icon. = "Advanced Scrolling Combat Text successfully Loaded. To load the options panel. Type /ASCT or click the mini map Icon."
 Holy Power = "Holy Power"
 Title = "Advanced Scrolling Combat text"
 Features = "Featur
commented

Author
Thank you! Adding it right now.

commented

I think you can also fix this by changing the .toc file(s) to add Advanced_Scrolling_Combat_Text_Options to

## RequiredDeps: Advanced_Scrolling_Combat_Text_Localize

i.e.

## RequiredDeps: Advanced_Scrolling_Combat_Text_Localize, Advanced_Scrolling_Combat_Text_Options

Maybe you only have to add that required dependency to Advanced_Scrolling_Combat_Text_Localize.

If _Options gets loaded first, it appears to define the global Advanced_Scrolling_Combat_Text_DB so the other two addons will have data to work with.

commented

Will look into that as well! Thank you so much for the bug report!

commented

Bug has been fully fixed! Will release it with the upcoming features next! Enjoy!

commented

Apparently you didn't test this enough because there are still errors when logging into a character that has no saved variables file.

commented

I'm releasing it right now!

commented

I just got this same or similar error message
will try the log out and log back in method.. after configuring the addon.
btw I am running this addon on Wrath-classic.


1x ...lling_Combat_Text/Gains_Losses/Spell Penetration.lua:9: attempt to index field 'Advanced_Scrolling_Combat_Text_Stats' (a nil value)
[string "@Advanced_Scrolling_Combat_Text/Gains_Losses/Spell Penetration.lua"]:9: in function <...lling_Combat_Text/Gains_Losses/Spell Penetration.lua:8>

Locals:
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'Advanced_Scrolling_Combat_Text_Stats' (a nil value)"
lastStat = -1
L =

{
Windwalker = "Windwalker"
Shadow = "Shadow"
Unholy = "Unholy"
msg = "is now ready!"
Unlearned Skills = "Unlearned Skills"
Sent Mail = "Sent Mail"
Colors for Fading Auras = "Colors for Fading Auras"
Shared Spell cd's = "Shared Spell cd's"
Frost Resistance = "Frost Resistance"
Fury = "Fury"
Nothing = "Nothing"
Enhancement = "Enhancement"
Warlock = "Warlock"
Leveling = "Leveling"
Trinket 1 = "Trinket 1"
Inventory full = "Inventory full"
Protection = "Protection"
Stats = "Stats"
Fading Buffs Alert = "Fading Buffs Alert"
Block Rating = "Block Rating"
War mode On = "War mode On"
Traps = "Traps"
Spell Icon Size = "Spell Icon Size"
Resource lost = "Resource lost"
Lost = "Lost"
Racials_Priest = "Racials_Priest"
Restoration = "Restoration"
Reset Icon Size = "Reset Icon Size"
Armor lost = "Armor lost"
Havoc = "Havoc"
Friends come Online = "Friends come Online"
Stamina = "Stamina"
Level up message = "Level up message"
Combat = "Combat"
Zone discovery = "Zone discovery"
Color Picker Spells = "Colors for Spells"
skill = "skill"
Unsupported_Line_5 = "Advanced Scrolling Combat Text not loaded!"
Agility = "Agility"
You lost = "You lost"
Experience Gains = "Experience Gains"
Hit Rating = "Hit Rating"
Insanity = "Insanity"
Astral Power = "Astral Power"
Marksmanship = "Marksmanship"
Defense Rating = "Defense Rating"
Title_SARTE = "Scrolling Ability Text"
Health = "Health"
Disable = "Disable"
Group Invites = "Group Invites"
Money Gains = "Money Gains"
Locked Items = "Locked Items"
You have gained the = "You have gained the"
Not Enough Honor Points = "Not Enough Honor Points"
Pvp Off = "Pvp Off"
Reset Class = "Reset Class"
Feral_Combat = "Feral_Combat"
Haste Rating = "Haste Rating"
Runic Power = "Runic Power"
Reset Both Aura and Icon Values = "Reset Both Aura and Icon Values"
Preservation = "Preservation"
Has challenged you to a duel. = "Has challenged you to a duel."
Brewmaster = "Brewmaster"
Shocks = "Shocks"
Rested = "Rested"
Trinket Slot Two = "The second trinket in slot 14."
Dungeon Difficulty Changed = "Dungeon Difficulty Changed"
Mana = "Mana"
Trinket 2 = "Trinket 2"
msg_Lust = " Lust is now ready!"
Reset Debuff fade time = "Reset Debuff fade time"
msg_Traps = " Traps are now ready!"
Achievement Gains = "Achievement Gains"
Retribution = "Retribution"
Tab = "This Tab is for Shaman's and Hunter's only."
Rage = "Rage"
Discipline = "Discipline"
Color Picker Leveling = "Colors for Leveling"
Buff has 5 seconds left = "Buff has 5 seconds left"
Skill Up = "Skill Up"
Mage = "Mage"
Strength = "Strength"
Auras = "Auras"
Devastation = "Devastation"
Armor Penetration = "Armor Penetration"
The time warning for Debuffs about to fade = "The time warning for Debuffs about to fade"
Debuff fade time = "Debuff fade time"
Priest = "Priest"
Trinket Slot One Info = "Announces when your first trinket comes off cooldown."
Trinket Slot One = "The first trinket in slot 13."
Trinkets = "Trinkets"
Color Picker = "Color Picker"
Hunter = "Hunter"
Skill Gained = "Skill Gained"
Player joins your group = "Player joins your group"
Keep Enabled = "Keep Enabled"
Death Quadrants = "Death Quadrants"
Spirit = "Spirit"
Armor = "Armor"
Unsupported_Line_1 = "You're running Advanced Scrolling Combat Text in an Unsupported game Version."
Frost = "Frost"
Spell Power = "Spell Power"
Unsupported_Line_2 = "The Addon does not work on Private Servers."
Is About to Fade! = "Is About to Fade!"
Congratulations = "Congratulations"
Icon = "Icon"
Dodge Rating = "Dodge Rating"
Items Looted = "Items Looted"
Money Lost = "Money Lost"
Expertise Rating = "Expertise Rating"
Critical Strike Rating = "Critical Strike Rating"
Focus = "Focus"
Maelstrom = "Maelstrom"