Questie

Questie

116M Downloads

Error message on login v3.69

drtakhs opened this issue ยท 12 comments

commented

Here is a screenshot of the error i get.

wowscrnshot_012617_011501

I get this every time i log into my character or every time i /reload.

This is a new character, only first quest is accepted and i haven't completed it yet... I click Yes and after reload it's there again! Never goes away...

The first time i launch the addon after deleting the SavedVariables i don't get the message.

commented

Same thing with 3.68 and 3.67

Versions below 3.66 (including 3.66) working like a charm

commented

This is by design. The first time you login with a "fresh" character and if you don't have any quests in your log you're fine. But, since you picked up one quest and then reloaded your UI or do a logout/login it kicks off this function because it thinks your using an old Questie Saved Variables file.

This is to resolve an issue where someone deletes a character then later decides to use that name for a new character. When you delete a character the game client doesn't wipe your AdonOn Saved Variables. This could cause some serious issues for new characters as you won't see any quests in the starter area in certain situations.

Once you get to level two, you'll never see this pop up again. Here is the function:

    -- If the user deletes a character and makes a new one by the same name then it will continue to use
    -- the same Saved Varibles file. This check will delete the Questie Saved Varibles file to prevent
    -- any quest issues for the new character.
    if UnitLevel("player") == 1 then
        for i,v in pairs(QuestieSeenQuests) do
            if (v == 0) or (v == -1) or (v == 1) then
                Questie:NUKE("newcharacter");
            end
        end
    end
commented

Maybe adjust the check to see if there are more than, say, three quests in the DB, because 1. you will be level two after one quest, two at the most, and 2. There's little point to wiping a DB with just three entries...

commented

@Muehe
...well that might work better. There is a greater chance of catching valid "deleted characters" with more than 3 quests in the log. Most toons that I've leveled from level one are level two during or by the time I hand in the first quest.

This might work better I think - my for loops skills are really bad. I might be doing this wrong.

    if UnitLevel("player") == 1 then
        for i,v in pairs(QuestieSeenQuests) do
            for count = 1, QuestieSeenQuests[i], 1 do
                if (count >= 3) then
                    Questie:NUKE("newcharacter");
                end
            end
        end
    end
commented

Ah, i see that makes sense! Sorry for false alarm... thanks for the explanation and fast response! Cheers :)

commented

Thanks for the bug report. You have a valid point. It is annoying to all of a sudden get a popup and not know what it is... and WTF it's for. :) A more narrow check like the one above should do the trick.

Once I know my for loops work, I'll check it in.

commented

I don't even get that second for loop. Why not this:

if UnitLevel("player") == 1 then
    local count = 0;
    for i,v in pairs(QuestieSeenQuests) do
        if (count < 3) then
            count += 1;
        else
            break;
        end
    end
    if count > 2 then
        Questie:NUKE("newcharacter");
    end
end
commented

Ahhh it only counts up to 3 then breaks the loop. Nice. Less memory intensive. I like it. We only need the first three indexes to validate anyway.

commented

y_u_no

commented

I'm at work... :P

commented

Oh ok ๐Ÿ˜…

commented

This has been fixed in the latest release - Hotfix:
https://github.com/AeroScripts/QuestieDev/releases/latest