View Single Post
01-17-10, 12:33 PM   #61
theiven
A Defias Bandit
Join Date: Feb 2007
Posts: 3
follow up question from #58

This post is a following question from my earlier post #57 and wurmfoods response #58


I did everything exactly as you described and in doing so figured out what was going on for the most part .
I had to fix a couple typos but in the end I was able to get everything working sorta as I wanted.
But I wanted the bags in the bank, so I decided to figure out how to do it on my own.

I found the place where the bank bags were being created. And copied the code from one of them but replacing the filter info from it with the filter info from my Mining filter.

Since I could not find filters specific to bankbags any where, and the names of the filters in the existing bankbag spones were the same as in the regular bank spones.

I figured you could use the same filters for both.
Anyway I created an entry in localization.lua for my bank bag, made no changes to the filters.lua and created a bag and spone point in cargBags_Nivaya.lua

Im posting the info from the cargBags_Nivaya.lua along with the line #s where I put them, and the error I am getting.
If anyone can tell me where I'm going wrong I would be grateful
I have went over this MANY times and I cant figure out whats wrong.

sorry I cant figure out how to make one of the scrolling windows many of you have in your posts so I'll past hear

this is my bankbag it starts on line #83

local t = cargBags:Spawn("cBniv_BankMining")
t:SetFilter(cB_Filters.fBank, true)
t:SetFilter(cB_Filters.fBankFilter, true)
t:setFilter(cB_Filters.fMining, true) -- this is line #86
cB_Bags.bankMining = t

And this is the error I"m getting from chat in game.

interface/addons/cargBags_Nivaya/cargBags_Nivaya.lua :86: atempt to call method 'setFilter' (a nil value)

and this is my spone info from line #192

createAnchorInfo(cB_Bags.bankMining, cB_Bags.bankQuest, "Bottom")

this is my filter and line #s and as I said it works fine with the normal bag

--Mining filter
cB_Filters.fMining = function(item)
local tC = cBniv_CatInfo[item.name]
if tC then return (tC == "cBniv_Mining") and true or false end
return (item.type and item.type == L.Trades) and (item.subType == "Metal & Stone")
end


and finnaly this in the localization info I added on line 195 in the localization.lua

["cBniv_BankMining"] = "Mining",


If anyone can help but needs more info .. or difrent info .. please tell me what you need thnks ether way to wurmfood for his respons it set me of on the right foot
  Reply With Quote