Hi, I encountered an issue with vocation doors script :
Error says :
[Error - LuaInterface::loadFile] data/actions/scripts/other/vocquest.lua:101: 'end' expected (to close 'function' at line 1) near 'else'
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.actionID== 1228) then
if getplayervocation(cid) == 1 or getplayervocation(cid) == 5 and getPlayerLevel(cid) >= 300 then
doTeleportThing(cid, {x = 18123, y = 18262, z = 7})
doSendMagicEffect(v,10)
else
doPlayerSendTextMessage(cid, 22, "Only Sorcerer level 300 may enter here!")
end
else if getplayervocation(cid) == 2 or getplayervocation(cid) == 6 and getPlayerLevel(cid) >= 300 then
doTeleportThing(cid, {x = 18127, y = 18262, z = 7})
doSendMagicEffect(v,10)
else
doPlayerSendTextMessage(cid, 22, "Only Druid level 300 may enter here!")
end
else if getplayervocation(cid) == 3 or getplayervocation(cid) == 7 and getPlayerLevel(cid) >= 300 then
doTeleportThing(cid, {x = 18131, y = 18262, z = 7})
doSendMagicEffect(v,10)
else
doPlayerSendTextMessage(cid, 22, "Only Paladin level 300 may enter here!")
end
else if getplayervocation(cid) == 4 or getplayervocation(cid) == 8 and getPlayerLevel(cid) >= 300 then
doTeleportThing(cid, {x = 18135, y = 18262, z = 7})
doSendMagicEffect(v,10)
else
doPlayerSendTextMessage(cid, 22, "Only Knights level 300 may enter here!")
end
end
return TRUE
end
Error says :
[Error - LuaInterface::loadFile] data/actions/scripts/other/vocquest.lua:101: 'end' expected (to close 'function' at line 1) near 'else'