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

Lua Error closingdoor.lua

JohnnyPark

New Member
Joined
Oct 26, 2012
Messages
2
Reaction score
0
I am having this error on my distro:
rHZoPUw.png

How to fix it?

My closingdoor.lua
Code:
function onStepOut(cid, item, position, fromPosition)
    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 = {x = position.x, y = position.y, z = position.z, stackpos = -1}
    local tileCount = getTileThingByPos(tmpPos)

    local i = 1
    local tmpItem = {uid = 1}
    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
 
Last edited:
Back
Top