When I first switch to THF, the THF.lua is loaded (Gearswap: Loaded your THF.lua file!). But then immediately after this it says:
Gearswap: Lua runtime error: Gearswap/flow.lua:102:
In the flow.lua file, these are the lines 100 - 107 (I've marked line 102)
Code
if type(swap_type) == 'function' then
results = { pcall(swap_type,...) }
if not table.remove(results,1) then error('\nUser Event Error: '..results[1]) end --line 102
elseif swap_type == 'equip_command' then
equip(val1)
else
user_pcall(swap_type,...)
endThen immediately after the above error, it says this error:
User Event Error: Windower/addons/GearSwap/libs/mote-treasurehunter.lua:137: attempt to index field '?' (a nil value)
And these are lines 134 - 149 in the mote-treasurehunter file (I've marked line 137)
Code
function on_status_change_for_th(new_status_id, old_status_id)
if gearswap.gearswap_disabled or T{2,3,4}:contains(old_status_id) or T{2,3,4}:contains(new_status_id) then return end
local new_status = gearswap.res.statuses[new_status_id].english --line 137
local old_status = gearswap.res.statuses[old_status_id].english
if new_status == 'Engaged' then
if _settings.debug_mode then add_to_chat(123,'Engaging '..player.target.id..'.') end
info.last_player_target_index = player.target.index
TH_for_first_hit()
elseif old_status == 'Engaged' then
if _settings.debug_mode and state.th_gear_is_locked then add_to_chat(123,'Disengaging. Unlocking TH.') end
info.last_player_target_index = 0
unlock_TH()
end
endAny help is greatly appreciated.
