Error: BOTF/BOTF.Book.Home.lua:163:attempt to compare number with nil
In BOTF / BOTF.BOTFBookIcon:LeftClick
stack traceback:
BOTF/BOTF.Book.Home.lua:163: in function 'show'
BOTF/BOTF.Book.lua:180: in function 'setPage'
BOTF/BOTF.lua:55 in function 'show'
BOTF/BOTF.lua:63: in function 'toggle'
BOTF/BOTF.Book.lua:58 in function <BOTF/BOTF.Book.lua:57>
Did some research and found this to be the offending code:
Code:
if v.level~='unknown' and tonumber(v.level)>= tonumber(playerLevel) then
pveSessionScore = pveSessionScore + (((1 * v.session_statistics.Victory_SoloKills) + v.session_statistics.Victory_KillingBlows + v.session_statistics.Victory_DamageAssists + v.session_statistics.Victory_DistractAssists + v.session_statistics.Victory_HealAssists) - ((1 * v.session_statistics.Defeat_SoloKills) + v.session_statistics.Defeat_KillingBlows + v.session_statistics.Defeat_DamageAssists + v.session_statistics.Defeat_DistractAssists + v.session_statistics.Defeat_HealAssists))
end
Which appears in several of the different config files.
It appears this is not populating the variable correctly:
Code:
local playerLevel = Inspect.Unit.Detail('player').level
But my knowledge of coding and of the overall code preventing me from implementing it correctly. Truthfully, I don't know if that is the correct fix or exactly the same issue even.. Note that ZorbaTHut mentions that it is a bug being fixed in 1.8.
Long story short:
I deleted the offending code from everywhere that it appears and the addon now works. I think the only undesirable result is that "unknown" player kills/deaths are not recorded in my stats, but I found I did not have that many anyways.