Any idea what's wrong with this script?
Gives this error below and when entering the training teleport it doesn't tp me anywhere but it sends the message 'Training'.
Script:
Gives this error below and when entering the training teleport it doesn't tp me anywhere but it sends the message 'Training'.
Lua:
[0:48:11.179] [Error - MoveEvents Interface]
[0:48:11.179] data/movements/scripts/Teleports/Trainers Teleport.lua:onStepIn
[0:48:11.179] Description:
[0:48:11.179] (luaGetThingPosition) Thing not found
Script:
Lua:
function onStepIn(cid, item, position, fromPosition)
for i = 17000, 17100 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) then
doTeleportThing(cid, pos)
doCreatureSay(cid, 'Training', 19, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return
end
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', 19, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end