ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   Use GetSkillAbilityInfo() to a scribing skill make game crash (https://www.esoui.com/forums/showthread.php?t=10924)

Lykeion 04/17/24 05:29 PM

Use GetSkillAbilityInfo() to a scribing skill makes game crash
 
Function proto, untouched in U42:
Code:

* GetSkillAbilityInfo(*[SkillType|#SkillType]* _skillType_, *luaindex* _skillLineIndex_, *luaindex* _skillIndex_)
** _Returns:_ *string* _name_, *textureName* _texture_, *luaindex* _earnedRank_, *bool* _passive_, *bool* _ultimate_, *bool* _purchased_, *luaindex:nilable* _progressionIndex_, *integer* _rank_

Code:
Code:

function ListAllCraftedSkillInfo()
    for skillType = 1, GetNumSkillTypes() do
        local numSkillLines = GetNumSkillLines(skillType)
        for skillLineIndex = 1, numSkillLines do
            local numSkills = GetNumSkillAbilities(skillType, skillLineIndex)
            local abilityName, CAbilityId
       
            for skillIndex = 1, numSkills do
                abilityName= nil
                CAbilityId = nil
                if (IsCraftedAbilitySkill(skillType, skillLineIndex, skillIndex)) then
                    CAbilityId = GetCraftedAbilitySkillCraftedAbilityId(skillType, skillLineIndex, skillIndex)
                    abilityName = GetCraftedAbilityDisplayName(CAbilityId)

                    local _, _, _, isPassive, isUltimate, isPurchased, progressionIndex = GetSkillAbilityInfo(skillType, skillLineIndex, skillIndex)
                    d("Ability Name: " .. abilityName .. " isPurchased: " .. tostring(isPurchased) .. " progressionIndex: " .. tostring(progressionIndex))
                end
            end
        end
    end
end

I'm not quite sure if this is a bug or not. Since, with the new method IsCraftedAbilitySkill() introduced in U42, I can avoid using GetSkillAbilityInfo() on scribing skills and thus crash the game. Perhaps this is the practice ZOS wants us to use. But it did give me some trouble and required a lot of extra judgment in the code to avoid this. It would be much better if it just gave me some null values to let me know that the method is not available on the scribing skill, instead of crashing the game.

ZOS_DanBatson 04/18/24 11:35 AM

Thank you for posting. We're already aware of the crash and a fix is incoming.

Lykeion 04/18/24 01:08 PM

Quote:

Originally Posted by ZOS_DanBatson (Post 49860)
Thank you for posting. We're already aware of the crash and a fix is incoming.

Thanks to the devs team for the attention! Hope this bug gets fixed soon


All times are GMT -6. The time now is 02:04 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI