gearswap has detected an error in the user function precast: ...x86) Windower/addons/gearswap/libs/sel-utility.lua.2259: attempt to index field "?" (a nil value)
Code
function main_weapon_is_one_handed() if player.equipment.main == nil or player.equipment.main == 'empty' then return false end return data.skills.one_handed_combat:contains(res.items[item_name_to_id(player.equipment.main)].skill) or false
This is the line the error refers to. How can i fix this?