ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   MasterMerchant.lua error (https://www.esoui.com/forums/showthread.php?t=7567)

tallett 01/15/18 04:55 PM

MasterMerchant.lua error
 
Master Merchant on load Lua error

Hi guys,

I have an issue with this addon every time I try and use it .

user:/AddOns/MasterMerchant/MasterMerchant.lua:2327: table index is nil
stack traceback:
user:/AddOns/MasterMerchant/MasterMerchant.lua:2327: in function 'MasterMerchant:InitBuyingadvice'
user:/AddOns/MasterMerchant/MasterMerchant.lua:3181: in function '(anonymous)'

I have tried to uninstall and deleting saved variables

Baertram 01/15/18 05:28 PM

I'm not using MM and won't test nor support the addon in any way, but it may work and help:

Try to change the code in the file MasterMerchant.lua at lines 2324ff to the following:

Lua Code:
  1. function MasterMerchant:initBuyingAdvice()
  2.   if MasterMerchant.originalSetupCallback then return end
  3. --Inserted by Baertram - START
  4.   if TRADING_HOUSE.m_searchResultsList == nil then return false end
  5. --Inserted by Baertram - END
  6.   local dataType = TRADING_HOUSE.m_searchResultsList.dataTypes[1]
  7.  
  8.   MasterMerchant.originalSetupCallback = dataType.setupCallback
  9.   if MasterMerchant.originalSetupCallback then
  10.       dataType.setupCallback = function(...)
  11.           local row, data = ...
  12.           MasterMerchant.originalSetupCallback(...)
  13.           zo_callLater(function() MasterMerchant.AddBuyingAdvice(row, data) end, 25)
  14.       end
  15.   else
  16.       d(GetString(MM_ADVICE_ERROR))
  17.   end
  18. end

And in lines 2272ff then:
Lua Code:
  1. function MasterMerchant:initSellingAdvice()
  2.   if MasterMerchant.originalSellingSetupCallback then return end
  3. --Inserted by Baertram - START
  4.   if TRADING_HOUSE.m_postedItemsList == nil then return false end
  5. --Inserted by Baertram - END
  6.   local dataType = TRADING_HOUSE.m_postedItemsList.dataTypes[2]
  7.  
  8.   MasterMerchant.originalSellingSetupCallback = dataType.setupCallback
  9.   if MasterMerchant.originalSellingSetupCallback then
  10.       dataType.setupCallback = function(...)
  11.           local row, data = ...
  12.           MasterMerchant.originalSellingSetupCallback(...)
  13.           zo_callLater(function() MasterMerchant.AddSellingAdvice(row, data) end, 25)
  14.       end
  15.   else
  16.       d(GetString(MM_ADVICE_ERROR))
  17.   end
  18. end

I'm not sure what the addon is adding there (Buying/Selling advice) but the funcitons might not work with my changes then.

tallett 01/16/18 05:43 AM

that didn't work but thanks anyway


All times are GMT -6. The time now is 08:08 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI