Ir para conteúdo
  • 0

Erro Kawarimi No Jutsu


IsaqueTeixeira

Pergunta

Olá gente esse é meu script, e ele está dando um erro.

 

function onAttack(cid, target)

if (isPlayer(target)) and getPlayerStorageValue(target, 14680) == 1 then

doSendMagicEffect(getCreaturePosition(cid), 54)

doCreatureAddHealth(cid, -getPlayerLevel(target))

pos = getPlayerPosition(target)

doSendMagicEffect(pos, 67)

doSendAnimatedText(pos, "Kawarimi!", math.random(1,255))

local safe = {

{x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y+2,pos.y+2), z=pos.z},

{x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y-2,pos.y-2), z=pos.z},

{x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y-2,pos.y-2), z=pos.z},

{x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y+2,pos.y+2), z=pos.z}

}

for i = 1, #safe do

rand = math.random(1, #safe)

if(queryTileAddThing(target, safe[rand]) == RETURNVALUE_NOERROR) then

doTeleportThing(target, safe[rand], true)

end

end

doSendDistanceShoot(pos, getPlayerPosition(target), 35)

setPlayerStorageValue(target, 14680, 0)

doSendMagicEffect(getCreaturePosition(target), 10)

return true

end

end

 

 

Está dando esse erro, [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/kawarimi.lua:28: '<eof>' expected near 'end'

[Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/kawarimi.lua)

data/creaturescripts/scripts/kawarimi.lua:28: '<eof>' expected near 'end'

Editado por isaque555
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

function onAttack(cid, target)

if (isPlayer(target)) and getPlayerStorageValue(target, 14680) == 1 then

doSendMagicEffect(getCreaturePosition(cid), 54)

doCreatureAddHealth(cid, -getPlayerLevel(target))

pos = getPlayerPosition(target)

doSendMagicEffect(pos, 67)

doSendAnimatedText(pos, "Kawarimi!", math.random(1,255))

local safe = {

{x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y+2,pos.y+2), z=pos.z},

{x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y-2,pos.y-2), z=pos.z},

{x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y-2,pos.y-2), z=pos.z},

{x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y+2,pos.y+2), z=pos.z}

}

for i = 1, #safe do

rand = math.random(1, #safe)

if(queryTileAddThing(target, safe[rand]) == RETURNVALUE_NOERROR) then

doTeleportThing(target, safe[rand], true)

end

end

doSendDistanceShoot(pos, getPlayerPosition(target), 35)

setPlayerStorageValue(target, 14680, 0)

doSendMagicEffect(getCreaturePosition(target), 10)

return true

end

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...