Dungeon Tools

Dungeon Tools

32.8k Downloads

lua error when clicking on enemies in a route

madar2252 opened this issue ยท 4 comments

commented

To be honest I am not sure what were I clicking on it when I got this lua error. I think something on the right side, in the list of the pulls\packs. It was a premade route what I got from somwhere in MythicDungeonTools previously.

Message: Interface\AddOns\DungeonTools\DungeonEnemies.lua:492: attempt to concatenate field 'name' (a nil value)
Time: Sat Jan  2 18:03:53 2021
Count: 1
Stack: Interface\AddOns\DungeonTools\DungeonEnemies.lua:492: attempt to concatenate field 'name' (a nil value)
[string "@Interface\AddOns\DungeonTools\DungeonEnemies.lua"]:492: in function `DisplayBlipTooltip'
[string "@Interface\AddOns\DungeonTools\DungeonEnemies.lua"]:96: in function <Interface\AddOns\DungeonTools\DungeonEnemies.lua:92>

Locals: self = <table> {
 DeleteAllPresets = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:3152
 DungeonEnemies_UpdateSelected = <function> defined @Interface\AddOns\DungeonTools\DungeonEnemies.lua:842
 GetCurrentPull = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:2347
 LiveSession_RequestSession = <function> defined @Interface\AddOns\DungeonTools\LiveSession.lua:83
 PingMap = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:2321
 AddPull = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:4113
 DungeonEnemies_UpdateSeasonalAffix = <function> defined @Interface\AddOns\DungeonTools\DungeonEnemies.lua:945
 HideInterface = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:681
 GetBlip = <function> defined @Interface\AddOns\DungeonTools\DungeonEnemies.lua:758
 RestoreScrollframeScripts = <function> defined @Interface\AddOns\DungeonTools\toolbar.lua:498
 GetFullScreenSizes = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:867
 ADDON_LOADED = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:144
 UpdateDungeonEnemies = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:2624
 IsFrameOffScreen = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:1009
 dungeonEnemies = <table> {
 }
 IsCurrentPresetTyrannical = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:2282
 POI_CreateFramePools = <function> defined @Interface\AddOns\DungeonTools\Pointsofinterest.lua:9
 CreateDevPanel = <function> defined @Interface\AddOns\DungeonTools\devpanel.lua:134
 StartEraserDrawing = <function> defined @Interface\AddOns\DungeonTools\toolbar.lua:841
 SetLivePreset = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:2417
 GetDungeonName = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:276
 LiveSession_SendPreset = <function> defined @Interface\AddOns\DungeonTools\LiveSession.lua:201
 UpdateEnemyInfoData = <function> defined @Interface\AddOns\DungeonTools\EnemyInfo.lua:553
 HardReset = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:5028
 CleanEnemyData = <function> defined @Interface\AddOns\DungeonTools\DungeonEnemies.lua:1328
 GetHighestFrameLevelAtCursor = <function> defined @Interface\AddOns\DungeonTools\toolbar.lua:529
 DisplayBlipTooltip = <function> defined @Interface\AddOns\DungeonTools\DungeonEnemies.lua:460
 ClearPull = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:4150
 StringToTable = <function> defined @Interface\AddOns\DungeonTools\Transmission.lua:92
 SkinProgressBar = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:982
 MakeRenameFrame = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:4227
 DungeonEnemies_UpdateBoralusFaction = <function> defined @Interface\AddOns\DungeonTools\DungeonEnemies.lua:991
 initToolbar = <function> defined @Interface\AddOns\DungeonTools\toolbar.lua:14
 POI_UpdateAll = <function> defined @Interface\AddOns\DungeonTools\Pointsofinterest.lua:486
 OpenCustomColorsDialog = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:2696
 LiveSession_SendCommand = <function> defined @Interface\AddOns\DungeonTools\LiveSession.lua:180
 MakeCustomColorFrame = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:3648
 UpdatePresetDropDown = <function> defined @Interface\AddOns\DungeonTools\DungeonTools.lua:1888
 HSVtoRGB = <functio
commented

The fix is in v1.1.8, to make sure it never happens again. It was related to i18n ๐Ÿ‘

I will go more in-depth on this and switch the way localization/internationalization is done to standardize, so people used to doing this do not have to know how to read/write LUA, but that's for another day.

Thank you for the bug report, and let me know if you find anything else!

commented

@madar2252 I've committed a possible change over on the branch I worked on to fix all the namespacing issues. You can, for now, just open DungeonEnemies.lua. On line 492, you should see this:

local text = data.name .." "..occurence..group.."\n"..string.format(L["Level %d %s"],data.level,data.creatureType).."\n".. string.format(L["%s HP"],MDT:FormatEnemyHealth(health)).."\n"

Replace with the following:

local mobName = data.name or ""
local text = mobName.." "..occurence..group.."\n"..string.format(L["Level %d %s"],data.level,data.creatureType).."\n".. string.format(L["%s HP"],MDT:FormatEnemyHealth(health)).."\n"

(Or just take the namespacing branch, which I should release once I have a few more eyes on it)

Out of curiosity, what dungeon was it? I'm not sure whether it is due to a deleted mob (i.e. if your route was plaguefall), or a mob in the mob DB without a name, and would like to find out ๐Ÿ˜„

commented

I found it, Theater of Pain, Chamber of Conquest, there are two guys, but you get only one of them. You always get the lua error when mouseover one guy from the pair (one of the guy is broken in all of the three pairs).

image

commented

Perfect, I'll fix the mob as well then; will leave the fallback to be sure.