Thread Tools Display Modes
01/15/18, 04:55 PM   #1
tallett
Join Date: Jan 2018
Posts: 2
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
  Reply With Quote
01/15/18, 05:28 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
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.
  Reply With Quote
01/16/18, 05:43 AM   #3
tallett
Join Date: Jan 2018
Posts: 2
that didn't work but thanks anyway
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » MasterMerchant.lua error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off