Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Message: [string "--[==[ Error in 'Herb/Ore TSU' ]==] return ..."]:115: attempt to index global 'TSM_API' (a nil value)
- Time: Mon Mar 30 21:35:19 2020
- Count: 4
- Stack: [string "--[==[ Error in 'Herb/Ore TSU' ]==] return ..."]:115: attempt to index global 'TSM_API' (a nil value)
- [string "--[==[ Error in 'Herb/Ore TSU' ]==] return function(allstates, event, prefix, text, channel, sender, target, zoneChannelID, localID, name, instanceID)
- function addComas(str)
- return #str % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or str:reverse():gsub("(%d%d%d)", "%1,"):reverse()
- end
- if event == "CHAT_MSG_ADDON" and prefix == "MBG" then
- local length = 0
- local globalPrice = 0
- local globalCounts = ""
- local globalTotal = 0
- if text == "reset" then
- local SenderExists = false
- local index
- for i, s in ipairs(aura_env.sender) do
- if s == sender then
- SenderExists = true
- index = i
- end
- end
- for itemID, data in pairs(aura_env.count) do
- if aura_env.count[itemID][index] then
- aura_env.count[itemID][index] = 0
- end
- end
- else
- str = " "..text.."\n"
- str = str:gsub("%s(%S-)=","\n%1=")
- for itemID, value in string.gmatch(str, "(%S-)=(.-)\n") do
- local SenderExists = false
- local index
- for i, s in ipairs(aura_env.sender) do
- if s == sender then
- SenderExists = true
- index = i
- end
- end
- if not SenderExists then
- table.insert(aura_env.sender, sender)
- index = table.getn(aura_env.sender)
- end
- if aura_env.count[itemID] then
- aura_env.count[itemID][index] = value
- else
- aura_env.count[itemID] = {}
- aura_env.count[itemID][index] = value
- end
- if string.len(tostring(value))+1 > length then
- length = string.len(tostring(value))+1
- end
- end
- if length == 0 then
- length = 4
- end
- local playerTotals = {}
- for i=1, table.getn(aura_env.sender) do
- local playerTotal = 0
- for itemID, data in pairs(aura_env.count) do
- if not data[i] then
- data[i] = 0
- end
- playerTotal = playerTotal + data[i]
- end
- if string.len(tostring(playerTotal))+1 > length then
- length = string.len(tostring(playerTotal))+1
- end
- playerTotals[i] = playerTotal
- globalTotal = globalTotal + playerTotal
- end
- for i,t in ipairs(playerTotals) do
- globalCounts = globalCounts..string.format("%-"..length.."s",t)
- end
- end
- if length == 0 then
- length = 4
- end
- for itemID, data in pairs(aura_env.count) do
- if aura_env.IDsArray[itemID] then
- local counts = ""
- local total = 0
- for i,v in ipairs(data) do
- counts = counts..string.format("%-"..length.."s",v)
- total = total + v
- end
- local TSM = ""
- if aura_env.config["TSM"] == 1 then
- TSM = "DBMarket"
- elseif aura_env.config["TSM"] == 2 then
- TSM = "DBMinBuyout"
- elseif aura_env.config["TSM"] == 3 then
- TSM = "DBHistorical"
- elseif aura_env.config["TSM"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement