Well i was looking into the npc system code and i found a nice function addBuyableItemContainer ok so i try to set up an npc and it gives me this console error
so i go to modules.lua to see the problem and i couldnt find anything... im not sure if im doing someh wrong so here is my npc script
Code:
data/npc/lib/npcsystem/modules.lua:787 attempt to index field 'npcHandler' a nil value
so i go to modules.lua to see the problem and i couldnt find anything... im not sure if im doing someh wrong so here is my npc script
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
ShopModule:addBuyableItemContainer({'bp sd'}, 1998, 2268, 100, 3, 'Backpack of sudden death')
npcHandler:addModule(FocusModule:new())
Last edited: