• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved NPC Script (Error - Npc Interface)

Miricx

New Member
Joined
Aug 6, 2010
Messages
7
Reaction score
0
I keep getting this error everytime I try to sell something to an NPC

[07/04/2014 17:15:02] [Error - Npc interface]
[07/04/2014 17:15:02] (Unknown script file)
[07/04/2014 17:15:02] Description:
[07/04/2014 17:15:02] data/npc/lib/npcsystem/modules.lua:1229: bad argument #2 to 'error' (number expected, got string)
[07/04/2014 17:15:02] stack traceback:
[07/04/2014 17:15:02] [C]: in function 'error'
[07/04/2014 17:15:02] data/npc/lib/npcsystem/modules.lua:1229: in function 'callbackOnSell'
[07/04/2014 17:15:02] data/npc/lib/npcsystem/npchandler.lua:265: in function 'processModuleCallback'
[07/04/2014 17:15:02] data/npc/lib/npcsystem/npchandler.lua:450: in function 'onSell'
[07/04/2014 17:15:02] data/npc/lib/npcsystem/modules.lua:1296: in function <data/npc/lib/npcsystem/modules.lua:1295>

Here's the: data/npc/lib/npcsystem/modules.lua:1229


if(shopItem == nil) then
error("[ShopModule.onBuy]", "Item not found on shopItems list")
return false
end

if(shopItem.buy == -1) then
error("[ShopModule.onSell]", "Attempt to purchase an item which only sellable")
return false
end

Here's the: data/npc/lib/npcsystem/npchandler.lua:265


tmpRet = module:callbackOnBuy(unpack(arg))
elseif(id == CALLBACK_ONSELL and module.callbackOnSell ~= nil) then
tmpRet = module:callbackOnSell(unpack(arg))

Here's the: data/npc/lib/npcsystem/npchandler.lua:265

if(self:processModuleCallback(CALLBACK_ONSELL, cid, itemid, subType, amount, ignoreCap, inBackpacks)) then

Here's the: data/npc/lib/npcsystem/modules.lua:1296

function(cid, itemid, subType, amount, ignoreCap, inBackpacks)
module.npcHandler:eek:nSell(cid, itemid, subType, amount, ignoreCap, inBackpacks)
end
 
Which server do you use? If it's TFS 0.3/0.4 you can try to use this modules.
http://www.speedy*****malware.localhost/CEttj/modules.lua
 
Hi @Limos ! you updated your modules.lua for tfs 0.4 or 0.3 but I still get debug when I say 'trade' . The npcs are all working, its only debuging every player when the trade windows appear! I'm running tfs 04 rev 5885 on a debian 7.5 dedicated server! and I don't know what I'm doing wrong :/ do you have any solution for this please! :?
 
Back
Top