This is a deletion rune script for an 8.0 server I'm working on. (Armonia)
I'm not a good scripter at all so....
function onUse(cid, item, frompos, item2, topos)
local destroy = {x=topos.x, y=topos.y, z=topos.z, stackpos=255}
local destroyitem = getThingfromPos(destroy)
if getPlayerAccess(cid) > 4 then
if destroyitem.itemid > 1025 or (destroyitem.itemid > 3139 and destroyitem.itemid < 3324) or (destroyitem.itemid > 5814 and destroyitem.itemid < 5851) or (destroyitem.itemid > 6695 and destroyitem.itemid < 6718) then
doRemoveItem(destroyitem.uid,100)
return 1
else
end
doPlayerSendTextMessage(cid,22,"You may not delete ground.")
return 0
end
else
end
doPlayerSendTextMessage(cid,22,"Only characters with the access of GMs or above may use this rune.")
return 0
end
It gets this error:
data/actions/scripts/deletion.lua:15: 'end' expected (to close 'function' at line 1) near 'else'
Please just fix the script don't tell me what to do because I'll just screw it up.
Thanks!
I'm not a good scripter at all so....
function onUse(cid, item, frompos, item2, topos)
local destroy = {x=topos.x, y=topos.y, z=topos.z, stackpos=255}
local destroyitem = getThingfromPos(destroy)
if getPlayerAccess(cid) > 4 then
if destroyitem.itemid > 1025 or (destroyitem.itemid > 3139 and destroyitem.itemid < 3324) or (destroyitem.itemid > 5814 and destroyitem.itemid < 5851) or (destroyitem.itemid > 6695 and destroyitem.itemid < 6718) then
doRemoveItem(destroyitem.uid,100)
return 1
else
end
doPlayerSendTextMessage(cid,22,"You may not delete ground.")
return 0
end
else
end
doPlayerSendTextMessage(cid,22,"Only characters with the access of GMs or above may use this rune.")
return 0
end
It gets this error:
data/actions/scripts/deletion.lua:15: 'end' expected (to close 'function' at line 1) near 'else'
Please just fix the script don't tell me what to do because I'll just screw it up.
Thanks!