LockedOut

LockedOut

104k Downloads

attempt to concatenate field 'charName' (a nil value)

chancedj opened this issue ยท 3 comments

commented

20x LockedOut\Helper.lua:342: attempt to concatenate field 'charName' (a nil value)
LockedOut\Helper.lua:342: in function getCharacterList' LockedOut\Configuration.lua:378: in function getDefaultOptions'
LockedOut\Configuration.lua:448: in function <LockedOut\Configuration.lua:447>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?
DataStore\libs\AceAddon-3.0\AceAddon-3.0-12.lua:529: in function `InitializeAddon'
DataStore\libs\AceAddon-3.0\AceAddon-3.0-12.lua:644: in function <DataStore\libs\AceAddon-3.0\AceAddon-3.0.lua:636>

Locals:
nil

commented

removed hack. should have actual fix in place now for this problem.

commented

Justitfy from Discord has provided a hack to work around the issue for now. I'll commit it and release a new version shortly but still leave this open.

commented

`Helper.lua around line 338
function addon:getCharacterList()
local charList = {};

if( LockoutDb == nil ) then return charList; end;

for realmName, characters in next, LockoutDb do
    for charNdx, charData in next, characters do
        if (charData.charName ~= nil) then
            charList[ realmName .. "." .. charData.charName ] = realmName .. " - " .. charData.charName;
        end
    end
end

return charList;

end
Minimap.lua around line 431
local function shouldDisplayChar( realmName, playerData )
if (playerData.charName == nil) then
return false;
end

addon:debug( realmName .. "." .. playerData.charName, playerData.currentLevel or -1 );

return  ( addon.config.profile.general.showCharList[ realmName .. "." .. playerData.charName ] ) and
        ( playerData.currentLevel == nil or playerData.currentLevel >= addon.config.profile.general.minTrackCharLevel )

end`