Na Amigo
The crazy girl
while i use the door it says this error i am using forgotten server 0.3.7_svn
here is my script below the error
here is the script
here is my script below the error
Code:
[16:24:36.997] [Error - MoveEvents Interface]
[16:24:36.997] data/movements/scripts/closingdoor.lua:onStepOut
[16:24:36.997] Description:
[16:24:36.997] data/movements/lib/050-function.lua:10: bad argument #1 to 'ipairs' (table expected, got nil)
[16:24:36.997] stack traceback:
[16:24:36.997] [C]: in function 'ipairs'
[16:24:36.997] data/movements/lib/050-function.lua:10: in function 'isInArray'
[16:24:36.997] data/movements/scripts/closingdoor.lua:7: in function <data/movements/scripts/closingdoor.lua:1>
Lua:
function onStepOut(cid, item, position, fromPosition)
if(getTileInfo(position).creatures > 0) then
return true
end
local newPosition = {x = position.x, y = position.y, z = position.z}
if(isInArray(verticalOpenDoors, item.itemid)) then
newPosition.x = newPosition.x + 1
else
newPosition.y = newPosition.y + 1
end
doRelocate(position, newPosition)
local tmpPos = position
tmpPos.stackpos = -1
local i, tmpItem, tileCount = 1, {uid = 1}, getTileThingByPos(tmpPos)
while(tmpItem.uid ~= 0 and i < tileCount) do
tmpPos.stackpos = i
tmpItem = getTileThingByPos(tmpPos)
if(tmpItem.uid ~= item.uid and tmpItem.uid ~= 0 and isMoveable(tmpItem.uid)) then
doRemoveItem(tmpItem.uid)
else
i = i + 1
end
end
doTransformItem(item.uid, item.itemid - 1)
return true
end