Well basically here is the screenshot of the error
and here is the script:
I just need to know what this means.
and here is the script:
Code:
function onThink(interval)
local Pos = Position
if not Position then
Pos = function (x, y, z)
local position = {x = 0, y = 0, z = 0}
if(tonumber(x .. y .. z) ~= nil) then
position = {x = x, y = y, z = z}
end
return position
end
end
end
function modify_pos(old, new)
return Pos(new.x and old.x+new.x or old.x, new.y and old.y+new.y or old.y, new.z and old.z+new.z or old.z)
end
local SPEED = 300 --fastest = 1, slowest = 1000
local PLATFORM = 420 --itemid of platform
local FLOOR = 460 --invisible tile
local path =
{
[NORTH] = {y = -1},
[EAST] = {x = 1},
[SOUTH] = {y = 1},
[WEST] = {x = -1}
}
function getPosition(position, lastPosition)
for direction, mod in pairs(path) do
local pos = modify_pos(position, mod)
if (getTileItemById(pos, FLOOR).uid > 0) and not doComparePositions(pos, lastPosition) then
return pos
end
end
return lastPosition
end
function doPlatform(position, lastPosition)
local posEx = getPosition(position, lastPosition)
doTransformItem(getTileItemById(posEx, FLOOR).uid, PLATFORM)
doCleanTile(position)
for i = 1, getTileInfo(position).things do
position.stackpos = getTileInfo(position).things-i
local cid = getThingFromPos(position).uid
if isCreature(cid) then
doTeleportThing(cid, posEx, false)
end
end
doTransformItem(getTileItemById(position, PLATFORM).uid, FLOOR)
return addEvent(doPlatform, SPEED, posEx, position)
end
function onStartup()
doPlatform(Pos(2115, 2061, 6), Pos(2115, 2062, 6))
return true
end
I just need to know what this means.