Parrot 2

Parrot 2

727k Downloads

v2.0.4 Error often in dungeon

ceylina opened this issue ยท 6 comments

commented

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:

commented

That is strange because I added a nil check for that some time ago. I wonder what is getting set there.

commented

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
commented

Nope still getting it. Somehow it just doesn't like me :(

commented

I rewrote it a bit, I just haven't had time to play in the past week to test it

commented

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

commented

I totally forgot I never actually pushed my fix for this ๐Ÿ˜“