I have error in console:
and my script is:
How I can fix that? TFS 0.4 dev
NPC System: ShopModule.onBuy - item not found on shopItems list
and my script is:
PHP:
local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
if items[item].buyPrice ~= 0 then
doPlayerRemoveMoney(cid, amount * items[item].buyPrice)
for i = 1, amount do
doPlayerAddItem(cid, items[item].item_id, amount)
end
doNPCTalkALot(cid, 200, {"You bought "..amount.." "..items[item].realName.." for "..items[item].buyPrice * amount.." gold coins."})
end
end
How I can fix that? TFS 0.4 dev