Zatyrax
Photoshop-er!
- Joined
- May 14, 2010
- Messages
- 54
- Reaction score
- 0
Hello! I am getting an error, dont know what it is, or if i just should ignore it. Using TFS 0.3.6.
Here is the error:
[01/06/2010 18:17:25] [Error - Npc interface]
[01/06/2010 18:17:25] (Unknown script file)
[01/06/2010 18:17:25] Description:
[01/06/2010 18:17:25] data/npc/lib/npcsystem/modules.lua:1156: bad argument #2 to 'error' (number expected, got string)
[01/06/2010 18:17:25] stack traceback:
[01/06/2010 18:17:25] [C]: in function 'error'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/modules.lua:1156: in function 'callbackOnBuy'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/npchandler.lua:263: in function 'processModuleCallback'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/npchandler.lua:440: in function 'onBuy'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/modules.lua:1292: in function <data/npc/lib/npcsystem/modules.lua:1291>
Dont know when its happening, but i guess its when a player tries to do something with a NPC.
EDIT: Also my anni quest dont work, here is the error:
[01/06/2010 16:15:18] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/annihilator.lua:5: '}' expected (to close '{' at line 1) near 'entry'
[01/06/2010 16:15:18] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/annihilator.lua)
[01/06/2010 16:15:18] data/actions/scripts/quests/annihilator.lua:5: '}' expected (to close '{' at line 1) near 'entry'
And here is my annihilator.lua:
Here is the error:
[01/06/2010 18:17:25] [Error - Npc interface]
[01/06/2010 18:17:25] (Unknown script file)
[01/06/2010 18:17:25] Description:
[01/06/2010 18:17:25] data/npc/lib/npcsystem/modules.lua:1156: bad argument #2 to 'error' (number expected, got string)
[01/06/2010 18:17:25] stack traceback:
[01/06/2010 18:17:25] [C]: in function 'error'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/modules.lua:1156: in function 'callbackOnBuy'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/npchandler.lua:263: in function 'processModuleCallback'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/npchandler.lua:440: in function 'onBuy'
[01/06/2010 18:17:25] data/npc/lib/npcsystem/modules.lua:1292: in function <data/npc/lib/npcsystem/modules.lua:1291>
Dont know when its happening, but i guess its when a player tries to do something with a NPC.
EDIT: Also my anni quest dont work, here is the error:
[01/06/2010 16:15:18] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/annihilator.lua:5: '}' expected (to close '{' at line 1) near 'entry'
[01/06/2010 16:15:18] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/annihilator.lua)
[01/06/2010 16:15:18] data/actions/scripts/quests/annihilator.lua:5: '}' expected (to close '{' at line 1) near 'entry'
And here is my annihilator.lua:
Code:
local config = {
daily = "no", -- allow only one enter per day? (like in global Tibia)
level = 100,
storage = 30015
entry =
{
{x = 1028, y = 1152, z = 15},
{x = 1027, y = 1152, z = 15},
{x = 1026, y = 1152, z = 15},
{x = 1025, y = 1152, z = 15}
},
destination =
{
{x = 1042, y = 1152, z = 15},
{x = 1043, y = 1152, z = 15},
{x = 1044, y = 1152, z = 15},
{x = 1045, y = 1152, z = 15}
}
}
config.daily = getBooleanFromString(config.daily)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == 1946) then
if(config.daily) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
else
doTransformItem(item.uid, item.itemid - 1)
end
return true
end
if(item.itemid ~= 1945) then
return true
end
local players = {}
for _, position in ipairs(config.entry) do
local pid = getTopCreature(position).uid
if(pid == 0 or not isPlayer(pid) or getCreatureStorage(pid, config.storage) > 0 or getPlayerLevel(pid) < config.level) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
return true
end
table.insert(players, pid)
end
for i, pid in ipairs(players) do
doSendMagicEffect(config.entry[i], CONST_ME_POFF)
doTeleportThing(pid, config.destination[i], false)
doSendMagicEffect(config.destination[i], CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid + 1)
return true
end