Ir para conteúdo
  • 0

Erro "END" no Script


Daniel07

Pergunta

Estou com esse erro neste scrit, poderiam me ajudar?

 

Script

Spoiler

function onUse(cid, item, frompos, item2, topos)

local dolls = {
[11256] = {pet = "Crystal Spider"},
[11207] = {pet = "Ashmunrah"},
[11144] = {pet = "Demon"},
[9019] = {pet = "Vampire"},
}
local go = dolls[item.itemid]
local summon = getCreatureSummons(cid)
local store,exausted = 156249,30

---------------------------------------------------

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, store) >= os.time() then
return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.")
end

if #summon >= 1 then
for _, pid in ipairs(summon) do
doRemoveCreature(pid)
doCreatureSay(cid, "Can go rest ["..go.pet.."]", TALKTYPE_ORANGE_1)
return true
end

doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid)))
doCreatureSay(cid, "Let battle ["..go.pet.."]", TALKTYPE_ORANGE_1)
return true
end

 

Erro

Spoiler

[16/8/2016 18:10:27] [Error - LuaInterface::loadFile] data/actions/scripts/teste.lua:30: 'end' expected (to close 'function' at line 15) near '<eof>'
[16/8/2016 18:10:27] [Error - Event::checkScript] Cannot load script (data/actions/scripts/teste.lua)
[16/8/2016 18:10:27] data/actions/scripts/teste.lua:30: 'end' expected (to close 'function' at line 15) near '<eof>'

 

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0
function onUse(cid, item, frompos, item2, topos)    local dolls = {        [11256] = {pet = "Crystal Spider"},        [11207] = {pet = "Ashmunrah"},        [11144] = {pet = "Demon"},        [9019] = {pet = "Vampire"},    }    local go = dolls[item.itemid]    local summon = getCreatureSummons(cid)    local store,exausted = 156249,30    ---------------------------------------------------    if getPlayerStorageValue(cid, store) >= os.time() then        return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.")    end    if #summon > 0 then        for _, pid in ipairs(summon) do            doRemoveCreature(pid)            doCreatureSay(cid, "Can go rest ["..go.pet.."]", TALKTYPE_ORANGE_1)        end    else             doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid)))        doCreatureSay(cid, "Let battle ["..go.pet.."]", TALKTYPE_ORANGE_1)    end    return trueend

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...