Running into a brand new issue with GearSwap. I logged off for the evening about ~8 hours ago with no problems. Sauntered up to Aello this morning and was presented with the following error:
gearswap/equip_processing.lua:268: attempt to index field '?' (a nil value)
Can anyone assist with a) finding a solution to the current issue b) explain what it is this function is doing in general?
Thank you in advance for the help :D :D
Here's is line 259 through 279 (the function it seems to be a part of):
Code
function to_names_set(equipment)
local equip_package = {}
for ind,cur_item in pairs(equipment) do
local name = 'empty'
if type(cur_item) == 'table' and cur_item.slot ~= empty then
if items[to_bag_api(res.bags[cur_item.bag_id].english)][cur_item.slot].id == 0 then return {} end
-- refresh_player() can run after equip packets arrive but before the item array is fully loaded,
-- which results in the id still being the initialization value.
name = res.items[items[to_bag_api(res.bags[cur_item.bag_id].english)][cur_item.slot].id][language]
end
if tonumber(ind) and ind >= 0 and ind <= 15 and math.floor(ind) == ind then
equip_package[toslotname(ind)] = name
else
equip_package[tostring(ind)] = name
end
end
return equip_package
end
