v2.0.4 Error often in dungeon
ceylina opened this issue ยท 6 comments
This happens most often in dungeons
6x Parrot\Data\CombatEvents.lua:127: Usage: GetPlayerInfoByGUID("playerGUID")
[C]: in function GetPlayerInfoByGUID' Parrot\Data\CombatEvents.lua:127: in function
value'
Parrot\Code\CombatEvents.lua:1658: in function <Parrot\Code\CombatEvents.lua:1653>
[C]: in function `gsub'
Parrot\Code\CombatEvents.lua:2058: in function <Parrot\Code\CombatEvents.lua:2020>
Parrot\Code\CombatEvents.lua:2178: in function <Parrot\Code\CombatEvents.lua:2175>
Locals:
That is strange because I added a nil check for that some time ago. I wonder what is getting set there.
It's not a definite thing either. It seems to happen when there is some delay in polling that info.
I'm checking if something like this fixes it. I haven't got an error since testing it this way but that is no guarantee it is fixed.
if info.sourceID then
if db.hideRealm and GetPlayerInfoByGUID(info.sourceID) then -- it's a player
result = result:gsub("-.*", "")
end
end
So yeah editing line 127 to look like this seems to have eliminated all these issues.
if db.hideRealm and info and info.sourceID and select(6, GetPlayerInfoByGUID(info.sourceID)) then -- it's a player