Key Master

Key Master

89.8k Downloads

1x ...faceKeyMaster/Core/UI/PlayerFrameMapping.lua:166: attempt to index local 'playerData' (a nil value)

linaori opened this issue ยท 4 comments

commented

Logged into a L68 alt, got in on another alt as well.

1x ...faceKeyMaster/Core/UI/PlayerFrameMapping.lua:166: attempt to index local 'playerData' (a nil value)
[string "@KeyMaster/Core/UI/PlayerFrameMapping.lua"]:166: in function `RefreshData'
[string "@KeyMaster/Core/UI/CharactersFrame.lua"]:354: in function `CreateCharacters'
[string "@KeyMaster/Core/UI/CharactersFrame.lua"]:368: in function `Initialize'
[string "@KeyMaster/Core/UI/UIinit.lua"]:58: in function `Initialize'
[string "@KeyMaster/KeyMaster.lua"]:118: in function <KeyMaster/KeyMaster.lua:108>
[string "@KeyMaster/KeyMaster.lua"]:229: in function <KeyMaster/KeyMaster.lua:206>

Locals:
self = <table> {
 CalculateRatingGain = <function> defined @KeyMaster/Core/UI/PlayerFrameMapping.lua:32
 RefreshData = <function> defined @KeyMaster/Core/UI/PlayerFrameMapping.lua:91
}
fetchNew = false
playerFrame = KM_Player_Frame {
 0 = <userdata>
 playerDetails = FontString {
 }
 realmName = KM_PlayerFrameRealmName {
 }
 playerName = KM_PLayerFramePlayerName {
 }
 playerNameLarge = KM_PLayerFramePlayerName {
 }
 playerRating = KM_PLayerFramePlayerRating {
 }
 texture = Texture {
 }
}
playerMapData = KM_PlayerMapInfo {
 0 = <userdata>
}
scoreCalcScores = KM_ScoreCalcScores {
 0 = <userdata>
 fortTitleBGBorder = Texture {
 }
 divider1 = Texture {
 }
 newRatingTitle = FontString {
 }
 ratingGain = FontString {
 }
 newRating = FontString {
 }
 keyLevel = FontString {
 }
 ratingGainTitle = FontString {
 }
}
scoreCalcDirection = KM_ScoreCalcDirection {
 0 = <userdata>
 text = FontString {
 }
}
playerFrame = KM_Player_Frame {
 0 = <userdata>
 playerDetails = FontString {
 }
 realmName = KM_PlayerFrameRealmName {
 }
 playerName = KM_PLayerFramePlayerName {
 }
 playerNameLarge = KM_PLayerFramePlayerName {
 }
 playerRating = KM_PLayerFramePlayerRating {
 }
 texture = Texture {
 }
}
selectedCharacterGUID = "Player-3682-09DD1D7C"
selectedCharacterClass = 1
selectedCharacterName = "Linalori"
selectedCharacterRealm = "Ragnaros"
localizedClassName = "Warrior"
className = "WARRIOR"
_ = 1
classRGB = <table> {
 r = 0.776471
 g = 0.607843
 b = 0.427451
}
hexColor = "ffc69b6d"
highlightFrame = KM_PlayerFrameHighlight {
 0 = <userdata>
 textureHighlight = Texture {
 }
}
characterIconFrame = KM_CharacterIcon {
 0 = <userdata>
 icon = Texture {
 }
}
playerModelFrame = KM_PlayerModel {
 0 = <userdata>
}
playerData = nil
(*temporary) = <function> defined =[C]:-1
(*temporary) = KM_PLayerFramePlayerRating {
 0 = <userdata>
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "Player-3682-09DD1D7C is not in the list of alternate characters."
(*temporary) = <table> {
 spairs = <function> defined @KeyMaster/Libs/Internal/Misc.lua:10
 FormatDurationSec = <function> defined @KeyMaster/Libs/Internal/Misc.lua:53
 RoundToOneDecimal = <function> defined @KeyMaster/Libs/Internal/Misc.lua:308
 CreateDefaultCharacterData = <function> defined @KeyMaster/Libs/Internal/Misc.lua:140
 TPrint = <function> defined @KeyMaster/Libs/Internal/Misc.lua:34
 WeekTime = <function> defined @KeyMaster/Libs/Internal/Schedule.lua:19
 LOAD_SAVED_GLOBAL_VARIABLES = <function> defined @KeyMaster/Libs/Internal/Misc.lua:226
 _ErrorMsg = <function> defined @KeyMaster/Libs/Internal/Misc.lua:123
 PlayerFrameMapping = <table> {
 }
 Factory = <table> {
 }
 Commands = <table> {
 }
 CharacterData = <table> {
 }
 VersionCompare = <function> defined @KeyMaster/Libs/Internal/Misc.lua:315
 RoundSingleDecimal = <function> defined @KeyMaster/Libs/Internal/Misc.lua:85
 FindLastVisiblePlayerRow = <function> defined @KeyMaster/Libs/Internal/Misc.lua:74
 week = 0
 GetWeek = <function> defined @KeyMaster/Libs/Internal/Schedule.lua:31
 MainInterface = <table> {
 }
 CreateHLine = <function> defined @KeyMaster/Libs/Internal/Misc.lua:58
 Coms = <table> {
 }
 WeeklyResetTime = <function> defined @KeyMaster/Libs/Internal/Schedule.lua:42
 DungeonTools = <table> {
 }
 GetTableLength = <function> defined @KeyMaster/Libs/Internal/Misc.lua:94
 HeaderFrame = <table> {
 }
 IsTextureAvailable = <function> defined @KeyMaster/Libs/Internal/Misc.lua:106
 Print = <function> defined @KeyMaster/KeyMaster.lua:101
 WhatsNew = <table> {
 }
 CharactersFrame = <table> {
 }
 PartyFrame = <table> {
 }
 PlayerFrame = <table> {
 }
 CharacterInfo = <table> {
 }
 RoundWholeNumber = <function> defined @KeyMaster/Libs/Internal/Misc.lua:90
 InfoFrame = <tab
commented

Thought this may have been an API error - but i was able to reproduce it. Looking into it. Thanks!

commented

@linaori Looks like this error is due to a comment on line 166 in PlayerFrameMapping.lua. Please remove the comment for "or KeyMaster.UnitData:GetUnitDataByUnitId("player")" and it will remove the error. This is due to the player data not being available on first load via savedvariables, so we use another function to gather the live data. We will test this some more and update it with the next release / patch.

Let me know if this works for you!

commented

It no longer errors with that change

commented

Will be fixed in 1.1.6