I got bug in this script:
This script should tp player when he use lever.
PHP:
local before, after = {x = 738, y = 700, z = 7}, {x = 743, y = 696, z = 7}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local k = item.itemid == 1945 then
if k then
local thing = getThingFromPos(before, false).uid
if isPlayer(thing) then
doTeleportThing(thing, after, true)
doSendMagicEffect(after, CONST_ME_ENERGYAREA)
doSendMagicEffect(before, CONST_ME_POFF)
end
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Code:
[28/01/2012 13:54:15] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/levertp1.lua:3: unexpected symbol near 'then'
[28/01/2012 13:54:15] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/levertp1.lua)
[28/01/2012 13:54:15] data/actions/scripts/quests/levertp1.lua:3: unexpected symbol near 'then'
This script should tp player when he use lever.
Last edited: