Slain
TrueHavoc.com
- Joined
- Nov 27, 2008
- Messages
- 2,243
- Reaction score
- 31
[05/08/2009 20:39:40] Lua Script Error: [Action Interface]
[05/08/2009 20:39:41] in a timer event called from:
[05/08/2009 20:39:41] data/actions/scripts/quests/inq lever6.lua
nUse
[05/08/2009 20:39:41] data/actions/scripts/quests/inq lever6.lua:3: attempt to index global 'item' (a nil value)
[05/08/2009 20:39:41] stack traceback:
[05/08/2009 20:39:41] data/actions/scripts/quests/inq lever6.lua:3: in function <data/actions/scripts/quests/inq lever6.lua:1>
im getting this error everytime the script makes the wall appear again. the wall appears but gives that error
Heres my script:
some help would be greatly appreciated.
[05/08/2009 20:39:41] in a timer event called from:
[05/08/2009 20:39:41] data/actions/scripts/quests/inq lever6.lua
[05/08/2009 20:39:41] data/actions/scripts/quests/inq lever6.lua:3: attempt to index global 'item' (a nil value)
[05/08/2009 20:39:41] stack traceback:
[05/08/2009 20:39:41] data/actions/scripts/quests/inq lever6.lua:3: in function <data/actions/scripts/quests/inq lever6.lua:1>
im getting this error everytime the script makes the wall appear again. the wall appears but gives that error
Heres my script:
local function back(params)
doCreateItem(params.wallid, 1, params.wallpos)
doTransformItem(params.laver, item.itemid - 1)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local corpsePos = {x=337,y=571,z=10,stackpos=1}
local corpse = getThingFromPos(corpsePos)
local corpseId = 5527
local wallPos = {x=335,y=572,z=10,stackpos=1}
local wall = getThingFromPos(wallPos)
local wallId = 1026
local time = 10
if (item.itemid == 1945 and corpse.itemid == corpseId and wall.itemid == wallId) then
doRemoveItem(corpse.uid, 1)
doRemoveItem(wall.uid, 1)
doTransformItem(item.uid, item.itemid + 1)
doPlayerSendTextMessage(cid,22,"You have three minutes to go through the portal before the wall closes!")
addEvent(back, time * 60 * 1000, {wallid = wallId, wallpos = wallPos, laver = item.uid})
elseif item.uid == 15016 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
end
return true
end
some help would be greatly appreciated.