• 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!

Vial of Oil

SasirO

Banned User
Joined
Apr 30, 2009
Messages
559
Reaction score
0
Im using tfs 0.3.6pl1 and im getting this error while trying to buy vial of oil..
Code:
[06/01/2010 14:11:43] [Error - Npc interface] 
[06/01/2010 14:11:43] (Unknown script file)
[06/01/2010 14:11:43] Description: 
[06/01/2010 14:11:43] data/npc/lib/npcsystem/modules.lua:1151: bad argument #2 to 'error' (number expected, got string)
[06/01/2010 14:11:43] stack traceback:
[06/01/2010 14:11:43] 	[C]: in function 'error'
[06/01/2010 14:11:43] 	data/npc/lib/npcsystem/modules.lua:1151: in function 'callbackOnBuy'
[06/01/2010 14:11:43] 	data/npc/lib/npcsystem/npchandler.lua:263: in function 'processModuleCallback'
[06/01/2010 14:11:43] 	data/npc/lib/npcsystem/npchandler.lua:440: in function 'onBuy'
[06/01/2010 14:11:43] 	data/npc/lib/npcsystem/modules.lua:1292: in function <data/npc/lib/npcsystem/modules.lua:1291>

Anybody knows whats the problem?:confused:

heres the line with the vial:
Code:
shopModule:addBuyableItem({'vial of oil'}, [COLOR="Red"]2006[/COLOR], [COLOR="Red"]20[/COLOR], [COLOR="Red"]11[/COLOR],'vial of oil')

2006 = vial id
20 = price
11 = fluid type
 
Last edited:
umm, is this a custom item? stace traceback means theres an error in the script, probably a spelling mistake or you didnt put "/>" or ">" somewhere.

if this isnt a custom and you downlaodd it and changed it, download it again and use the original, then change everything one at a time.

_________________
Rep if i helped
 
Why should vial of oil be a custom item hmm?

heres the whole 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:addBuyableItem({'birdcage kit'}, 3918, 50, 1,'birdcage kit') 
shopModule:addBuyableItem({'chimney kit'}, 8692, 200, 1,'chimney kit') 
shopModule:addBuyableItem({'coal basin kit'}, 3908, 25, 1,'coal basin kit')
shopModule:addBuyableItem({'cuckoo clock kit'}, 7961, 40, 1,'cuckoo clock kit')
shopModule:addBuyableItem({'globe kit'}, 3927, 50, 1,'globe kit')
shopModule:addBuyableItem({'Goldfish Bowl'}, 5929, 50, 1,'Goldfish Bowl')
shopModule:addBuyableItem({'pendulum clock kit'}, 3933, 75, 1,'pendulum clock kit')
shopModule:addBuyableItem({'picture'}, 1854, 50, 1,'picture')
shopModule:addBuyableItem({'picture'}, 1852, 50, 1,'picture')
shopModule:addBuyableItem({'picture'}, 1853, 50, 1,'picture')
shopModule:addBuyableItem({'table lamp kit'}, 3937, 35, 1,'table lamp kit')
shopModule:addBuyableItem({'telescope kit'}, 7962, 70, 1,'telescope kit')
shopModule:addBuyableItem({'oval mirror'}, 1851, 40, 1,'oval mirror')
shopModule:addBuyableItem({'round mirror'}, 1845, 40, 1,'round mirror')
shopModule:addBuyableItem({'edged mirror'}, 1848, 50, 1,'edged mirror')
shopModule:addBuyableItem({'water pipe'}, 2099, 40, 1,'water pipe')
shopModule:addBuyableItem({'present'}, 1990, 10, 1,'present')
shopModule:addBuyableItem({'red backpack'}, 2000, 20, 1,'red backpack')
shopModule:addBuyableItem({'red bag'}, 1993, 5, 1,'red bag')
shopModule:addBuyableItem({'book'}, 1955, 15, 1,'book')
shopModule:addBuyableItem({'book'}, 1958, 15, 1,'book')
shopModule:addBuyableItem({'book'}, 1950, 15, 1,'book')
shopModule:addBuyableItem({'candelabrum'}, 2041, 8, 1,'candelabrum')
shopModule:addBuyableItem({'football'}, 2109, 111, 1,'football')
shopModule:addBuyableItem({'candlestick'}, 2047, 2, 1,'candlestick')
shopModule:addBuyableItem({'document'}, 1952, 12, 1,'document')
shopModule:addBuyableItem({'parchment'}, 1948, 8, 1,'parchment')
shopModule:addBuyableItem({'scroll'}, 1949, 5, 1,'scroll')
shopModule:addBuyableItem({'torch'}, 2050, 2, 1,'torch')
shopModule:addBuyableItem({'vial of oil'}, 2006, 20, 11,'vial of oil')
shopModule:addBuyableItem({'watch'}, 2036, 20, 1,'watch')



npcHandler:addModule(FocusModule:new())

Anybody?:confused:
 
those files is where your problem lies:
[06/01/2010 14:11:43] data/npc/lib/npcsystem/modules.lua:1151: bad argument #2 to 'error' (number expected, got string)
[06/01/2010 14:11:43] stack traceback:
[06/01/2010 14:11:43] [C]: in function 'error'
[06/01/2010 14:11:43] data/npc/lib/npcsystem/modules.lua:1151: in function 'callbackOnBuy'
[06/01/2010 14:11:43] data/npc/lib/npcsystem/npchandler.lua:263: in function 'processModuleCallback'
[06/01/2010 14:11:43] data/npc/lib/npcsystem/npchandler.lua:440: in function 'onBuy'
[06/01/2010 14:11:43] data/npc/lib/npcsystem/modules.lua:1292: in function <data/npc/lib/npcsystem/modules.lua:1291>

theres an error in those files.
 
It's because of reverseFluidMap.

With it, max fluid subType in shopWindows is 7 (it's been always like this, not just since 0.3.6).

I'll explain further when I have more time.
 
Back
Top