Meivyn / AdventureGuideLockouts

A fork and continuation of Adventure Guide Saved Instances WoW add-on.
https://wow.curseforge.com/projects/adventure-guide-lockouts
GNU General Public License v3.0
9 stars 2 forks source link

Core.lua:202: table index is nil #10

Closed tordenflesk closed 5 years ago

tordenflesk commented 5 years ago

3x AdventureGuideLockouts\Core.lua:202: table index is nil AdventureGuideLockouts\Core.lua:202: in function `UpdateSavedInstances' AdventureGuideLockouts\Core.lua:385: in function <AdventureGuideLockouts\Core.lua:377>

Locals: self =

{ worldBosses =
{ } UpdateStatusFramePosition = defined @AdventureGuideLockouts\Core.lua:285 UpdateSavedInstances = defined @AdventureGuideLockouts\Core.lua:131 isDarkshoreAvailable = false isStromgardeAvailable = true instances =
{ } GetSavedWorldBossEncounterInfo = defined @AdventureGuideLockouts\Core.lua:119 instancesLockouts =
{ } UpdateInstanceStatusFrame = defined @AdventureGuideLockouts\Core.lua:328 RequestWarfrontInfo = defined @AdventureGuideLockouts\Core.lua:50 CreateStatusFrame = defined @AdventureGuideLockouts\Core.lua:220 GetSavedWorldBossInfo = defined @AdventureGuideLockouts\Core.lua:89 eventFrame = { } UpdateFrames = defined @AdventureGuideLockouts\Core.lua:360 } savedInstances = 3 savedWorldBosses = 5 instanceName = "The Eternal Palace" instanceID = nil instanceReset = 131851 instanceDifficulty = 17 locked = true extended = false instanceIDMostSig = 524550145 isRaid = true maxPlayers = 30 difficultyName = "Looking For Raid" numEncounters = 0 numCompleted = 0 difficulty = 1 playerFaction = "Alliance" (for index) = 1 (for limit) = 8 (for step) = 1 instanceIndex = 1 encounters =
{ } encounterIndex = 1 (temporary) =
{ } (temporary) =
{ } (temporary) = false (temporary) = false (temporary) = false (temporary) = false (temporary) = nil (temporary) = true (temporary) = nil (temporary) = 1 (temporary) = 1 (temporary) = nil (temporary) = nil (temporary) = nil (*temporary) = "table index is nil" GetNumSavedInstances = defined =[C]:-1 UnitFactionGroup = defined =[C]:-1 GetSavedInstanceInfo = defined =[C]:-1 tonumber = defined =[C]:-1 GetSavedInstanceChatLink = defined =[C]:-1 GetDifficultyInfo = defined =[C]:-1 GetSavedInstanceEncounterInfo = defined =[C]:-1 tinsert = defined =[C]:-1 C_TaskQuest_GetQuestTimeLeftMinutes = defined =[C]:-1

Meivyn commented 5 years ago

Hello, can you let me know what you were doing at the time of the error?

tordenflesk commented 5 years ago

Iirc, opened the guide while in a normal-mode raid.

-Espen

On 13.08.2019 14:08, Meivyn wrote:

Hello, can you let me know what you were doing at the time of the error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Meivyn/AdventureGuideLockouts/issues/10?email_source=notifications&email_token=AAQJVF7YOC22MMTI5M6P7IDQEKP4RA5CNFSM4ILEZU72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4FONIY#issuecomment-520808099, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQJVF4YUNCJ6M5ULF3M2PDQEKP4RANCNFSM4ILEZU7Q.

Meivyn commented 5 years ago

After reloading, do you get that error again? If so, please open Core.lua and replace line 145

      instanceID = self.instances[tonumber(GetSavedInstanceChatLink(instanceIndex):match(":(%d+)"))]

With

      local instanceLink = GetSavedInstanceChatLink(instanceIndex)
      local instanceLinkID = tonumber(instanceLink:match(":(%d+)"))
      instanceID = self.instances[instanceLinkID]

Then save and do a /reload, and show me the error again please.

VIKINGYFY commented 5 years ago

After reloading, do you get that error again? If so, please open Core.lua and replace line 145

      instanceID = self.instances[tonumber(GetSavedInstanceChatLink(instanceIndex):match(":(%d+)"))]

With

      local instanceLink = GetSavedInstanceChatLink(instanceIndex)
      local instanceLinkID = tonumber(instanceLink:match(":(%d+)"))
      instanceID = self.instances[instanceLinkID]

Then save and do a /reload, and show me the error again please.

Same problem. The Stonecore(instanceID = 725) too.

I think I know why, instanceID is wrong in Instances.lua. like Stonecore, true instanceID is 725, but 752 in your Instances.lua.

Meivyn commented 5 years ago

Yeah this one is probably a typo, thanks for pointing it out, but it shouldn't happens with The Eternal Palace. Please post your error again so I can see the values used by the variables after my edits.

tordenflesk commented 5 years ago

Another one, during a HC Island:

1x AdventureGuideLockouts\Core.lua:202: table index is nil

AdventureGuideLockouts\Core.lua:202: in function `UpdateSavedInstances' AdventureGuideLockouts\Core.lua:385: in function <AdventureGuideLockouts\Core.lua:377>

Locals: self =

{ worldBosses =
{ } UpdateStatusFramePosition = defined @AdventureGuideLockouts\Core.lua:285 UpdateSavedInstances = defined @AdventureGuideLockouts\Core.lua:131 isDarkshoreAvailable = false isStromgardeAvailable = true instances =
{ } GetSavedWorldBossEncounterInfo = defined @AdventureGuideLockouts\Core.lua:119 instancesLockouts =
{ } UpdateInstanceStatusFrame = defined @AdventureGuideLockouts\Core.lua:328 RequestWarfrontInfo = defined @AdventureGuideLockouts\Core.lua:50 CreateStatusFrame = defined @AdventureGuideLockouts\Core.lua:220 GetSavedWorldBossInfo = defined @AdventureGuideLockouts\Core.lua:89 eventFrame = { } UpdateFrames = defined @AdventureGuideLockouts\Core.lua:360 } savedInstances = 4 savedWorldBosses = 5 instanceName = "The Eternal Palace" instanceID = nil instanceReset = 570578 instanceDifficulty = 17 locked = true extended = false instanceIDMostSig = 524550145 isRaid = true maxPlayers = 30 difficultyName = "Looking For Raid" numEncounters = 0 numCompleted = 0 difficulty = 1 playerFaction = "Alliance" (for index) = 1 (for limit) = 9 (for step) = 1 instanceIndex = 1 encounters =
{ } encounterIndex = 1 (temporary) =
{ } (temporary) =
{ } (temporary) = false (temporary) = false (temporary) = false (temporary) = false (temporary) = nil (temporary) = true (temporary) = nil (temporary) = 1 (temporary) = 1 (temporary) = nil (temporary) = nil (temporary) = nil (*temporary) = "table index is nil" GetNumSavedInstances = defined =[C]:-1 UnitFactionGroup = defined =[C]:-1 GetSavedInstanceInfo = defined =[C]:-1 tonumber = defined =[C]:-1 GetSavedInstanceChatLink = defined =[C]:-1 GetDifficultyInfo = defined =[C]:-1 GetSavedInstanceEncounterInfo = defined =[C]:-1 tinsert = defined =[C]:-1 C_TaskQuest_GetQuestTimeLeftMinutes = defined =[C]:-1

Meivyn commented 5 years ago

This is another issue with The Eternal Palace in LFR mode. Please right-click this file then save as and replace the original Core.lua in World of Warcraft/_retail_/Interface/AddOns/AdventureGuideLockouts by this one.

Relaunch WoW then show me the error again. I can't help you if you don't provide me more information with the edits I posted above.

Meivyn commented 5 years ago

Are you still having this issue? I'm waiting to fix it to push the release.

VIKINGYFY commented 5 years ago

Are you still having this issue? I'm waiting to fix it to push the release.

emmm,its should be OK.

tordenflesk commented 5 years ago

Just zoned into "the circle of starts" LFR, first boss:

1x AdventureGuideLockouts\Core.lua:204: table index is nil AdventureGuideLockouts\Core.lua:204: in function `UpdateSavedInstances' AdventureGuideLockouts\Core.lua:387: in function <AdventureGuideLockouts\Core.lua:379>

Locals: self =

{ worldBosses =
{ } UpdateStatusFramePosition = defined @AdventureGuideLockouts\Core.lua:287 UpdateSavedInstances = defined @AdventureGuideLockouts\Core.lua:131 isDarkshoreAvailable = true isStromgardeAvailable = false instances =
{ } GetSavedWorldBossEncounterInfo = defined @AdventureGuideLockouts\Core.lua:119 instancesLockouts =
{ } UpdateInstanceStatusFrame = defined @AdventureGuideLockouts\Core.lua:330 RequestWarfrontInfo = defined @AdventureGuideLockouts\Core.lua:50 CreateStatusFrame = defined @AdventureGuideLockouts\Core.lua:222 GetSavedWorldBossInfo = defined @AdventureGuideLockouts\Core.lua:89 eventFrame = { } UpdateFrames = defined @AdventureGuideLockouts\Core.lua:362 } savedInstances = 4 savedWorldBosses = 5 instanceName = "The Eternal Palace" instanceID = nil instanceReset = 299050 instanceDifficulty = 17 locked = true extended = false instanceIDMostSig = 524550145 isRaid = true maxPlayers = 30 difficultyName = "Looking For Raid" numEncounters = 0 numCompleted = 0 difficulty = 1 playerFaction = "Alliance" (for index) = 1 (for limit) = 9 (for step) = 1 instanceIndex = 1 encounters =
{ } encounterIndex = 1 (temporary) =
{ } (temporary) =
{ } (temporary) = "Looking For Raid" (temporary) = "raid" (temporary) = false (temporary) = false (temporary) = false (temporary) = false (temporary) = nil (temporary) = true (temporary) = nil (temporary) = 1 (temporary) = 1 (temporary) = nil (temporary) = nil (temporary) = nil (*temporary) = "table index is nil" GetNumSavedInstances = defined =[C]:-1 UnitFactionGroup = defined =[C]:-1 GetSavedInstanceInfo = defined =[C]:-1 GetSavedInstanceChatLink = defined =[C]:-1 tonumber = defined =[C]:-1 GetDifficultyInfo = defined =[C]:-1 GetSavedInstanceEncounterInfo = defined =[C]:-1 tinsert = defined =[C]:-1 C_TaskQuest_GetQuestTimeLeftMinutes = defined =[C]:-1

Meivyn commented 5 years ago
VIKINGYFY commented 5 years ago

#10 (comment)

I can't do more if you don't do this.

i test The Eternal Palace afternoon, its OK, you can push the release.

Meivyn commented 5 years ago

Closing the issue as I don't have any news from you, and sadly you don't help me to fix it.

Meivyn commented 5 years ago

I think you only have a too old version. This is why instanceID is nil as it's not present in Instances.lua. I don't see any other case when this can happen. Anyway, be sure to update.