ChampionCommander

ChampionCommander

2M Downloads

LUA Error with 1.1.0-Beta3

Moowalker opened this issue ยท 3 comments

commented

I am getting the following LUA error when opening the mission table:

7x ChampionCommander\cache.lua:402: attempt to index field 'allArtifactPower' (a nil value)
ChampionCommander\cache.lua:402: in function <ChampionCommander\cache.lua:378>
ChampionCommander\cache.lua:434: in function `Reward2Class'
ChampionCommander\cache.lua:483: in function <ChampionCommander\cache.lua:479>
ChampionCommander\matchmaker.lua:581: in function `Match'
ChampionCommander\matchmaker.lua:694: in function `?'
ChampionCommander\missionlist.lua:540: in function <ChampionCommander\missionlist.lua:524>
(tail call): ?
ChampionCommander\missionlist.lua:569: in function `ReloadMissions'
ChampionCommander\missionlist.lua:753: in function <ChampionCommander\missionlist.lua:733>
(tail call): ?
[C]: ?
[C]: in function `Show'
FrameXML\UIParent.lua:2614: in function `SetUIPanel'
FrameXML\UIParent.lua:2420: in function `ShowUIPanel'
FrameXML\UIParent.lua:2320: in function <FrameXML\UIParent.lua:2316>
[C]: in function `SetAttribute'
FrameXML\UIParent.lua:3141: in function `ShowUIPanel'
FrameXML\UIParent.lua:1724: in function <FrameXML\UIParent.lua:1090>

Locals:
self = <table> {
 MAXLEVEL = <function> defined @ChampionCommander\ChampionCommander.lua:131
 modules = <table> {
 }
 CancelTimer = <function> defined @ElvUI\Libraries\AceTimer-3.0\AceTimer-3.0.lua:147
 IsBlacklisted = <function> defined @ChampionCommander\core.lua:165
 GetAverageLevels = <function> defined @ChampionCommander\cache.lua:945
 allEquipments = <table> {
 }
 RebuildMissionCache = <function> defined @ChampionCommander\cache.lua:932
 GetDataModule = <function> defined @ChampionCommander\data.lua:14
 ActivateButton = <function> defined @ChampionCommander\core.lua:199
 GetDifficultyColors = <function> defined @ChampionCommander\core.lua:226
 GetMissionlistModule = <function> defined @ChampionCommander\missionlist.lua:16
 SetDefaultModulePrototype = <function> defined @ElvUI\Libraries\AceAddon-3.0\AceAddon-3.0.lua:440
 MAXQUALITY = <function> defined @ChampionCommander\ChampionCommander.lua:134
 GetResources = <function> defined @ChampionCommander\cache.lua:745
 GetCacheModule = <function> defined @ChampionCommander\cache.lua:16
 IsEnabled = <function> defined @ElvUI\Libraries\AceAddon-3.0\AceAddon-3.0.lua:482
 GetCompletedMissionData = <function> defined @ChampionCommander\autocomplete.lua:569
 MarkAsSeen = <function> defined @ChampionCommander\core.lua:289
 ReloadMissions = <function> defined @ChampionCommander\missionlist.lua:562
 RegisterMessage = <function> defined @SharedMedia\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:116
 UnregisterMessage = <function> defined @SharedMedia\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:179
 Pulse = <function> defined @ChampionCommander\missionlist.lua:638
 hooks = <table> {
 }
 db = <table> {
 }
 PauseApply = <function> defined @ChampionCommander\missionlist.lua:491
 Apply = <function> defined @ChampionCommander\missionlist.lua:494
 SetEnabledState = <function> defined @ElvUI\Libraries\AceAddon-3.0\AceAddon-3.0.lua:455
 Hook = <function> defined @ElvUI\Libraries\AceHook-3.0\AceHook-3.0.lua:274
 EmptyPermutations = <function> defined @ChampionCommander\cache.lua:850
 PushRefresher = <function> defined @ChampionCommander\missionlist.lua:553
 Reserve = <function> defined @ChampionCommander\ChampionCommander.lua:207
 Reward2Class = <function> defined @ChampionCommander\cache.lua:431
 ColorFromBias = <function> defined @ChampionCommander\ChampionCommander.lua:143
 NeedsTutorial = <function> defined @ChampionCommander\tutorials.lua:411
 ShowPermutations = <function> defined @ChampionCommander\missionpage.lua:289
 OnInitialized = <function> defined @ChampionCommander\core.lua:142
 GetMissionpageModule = <function> defined @ChampionCommander\missionpage.lua:16
 NewModule = <function> defined @ElvUI\Libraries\AceAddon-3.0\AceAddon-3.0.lua:266
 GetMembersFrame = <function> defined @ChampionCommander\missionlist.lua:816
 SortTroop = <function> defined @ChampionCommander\cache.lua:815
 CleanPermutations = <function> defined @ChampionCommander\missionlist.lua:389
 revision = "ad50597"
 Unban = <function> defined @ChampionCommander\ChampionCommander.lua:222
 GetSelectedParty = <function> defined @ChampionCommander\matchmaker.lua:652
 GetName = <function> defined @ElvUI\Libraries\AceAddon-3.0\AceAddon-3.0.lua:310
 DumpPermutations = <function> defined @ChampionCommander\cache.lua:924
 name = "ChampionCommander"
 RefillParties = <function> defined @ChampionCommander\matchmaker.lu
commented

See issue #16. Beta 3 forgot to remove the references to Artifact Power in cache.lua so removing or commenting out lines 402 through 404 and changing the elseif on line 405 to if will fix the issue.

commented

Interesting, back in my day we'd call this a fatal bug... i.e. can't run the software at all with it happening. I erred in posting that LUA error in the wrong place, for the Legion mission table over on curse... good thing I found it here. Can 100% confirm that Zarggg's solution is 100% effective. AND I am NOT running any M$ OS software to boot.

Interestingly enough that Twitch calls this "Modified" in their list of add-ons and shows I need an update to B3. AND the in-game display SAYS it's B2. Also of interesting nore, in MANY places in game, it IS referred to as "Artifact Power."

Thanks a million to Zarggg for getting us back up and running before we see a B4 rev. Aside to those not THAT familiar with coding, rename the original file something like "cache.orig.lua," edit and save as "cache.lua."

commented

Yep, Zargg solution is exactly what I am applying (I also added a fake artifat power table to make things run smoothly if I forgot another reference