Mote-treasurehunter Error

Language: JP EN DE FR
New Items
2021-02-21
users online
Forum » Windower » Support » mote-treasurehunter error
mote-treasurehunter error
 Ragnarok.Boq
Offline
Server: Ragnarok
Game: FFXI
user: Boq
Posts: 28
By Ragnarok.Boq 2021-02-07 00:34:22
Link | Quote | Reply
 
Hello. I've recently started receiving two errors when I switch to THF, which uses a gearswap lua based off of one by Arislan. The lua uses mote-treasurehunter.lua. Hopefully this isn't too difficult to determine the issue. I'm not extremely adept at this coding.

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,...)
    end

Then 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
end


Any help is greatly appreciated.
Offline
Posts: 15
By hezron 2021-02-07 06:15:49
Link | Quote | Reply
 
Have you tried updating your libs?
 Ragnarok.Boq
Offline
Server: Ragnarok
Game: FFXI
user: Boq
Posts: 28
By Ragnarok.Boq 2021-02-07 08:05:03
Link | Quote | Reply
 
hezron said: »
Have you tried updating your libs?

Well, I did search for a newer version of mote-treasurehunter.lua, but I wasn't able to find something more recent. I had been using this THF lua for over a year with no issues, until very recently when I've been seeing the aforementioned errors.
Log in to post.