Thread Tools Display Modes
04/17/24, 05:29 PM   #1
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 21
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.

Last edited by Lykeion : 04/18/24 at 02:42 AM. Reason: supplementary info
  Reply With Quote
04/18/24, 11:35 AM   #2
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 181
Thank you for posting. We're already aware of the crash and a fix is incoming.
  Reply With Quote
04/18/24, 01:08 PM   #3
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 21
Originally Posted by ZOS_DanBatson View Post
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
  Reply With Quote

ESOUI » Developer Discussions » Bug Reports » Use GetSkillAbilityInfo() to a scribing skill make game crash


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off