Postado Setembro 13, 2022 2 anos .Qual servidor ou website você utiliza como base? NTO HARD Qual o motivo deste tópico? Está surgindo esse erro com algumas spells do meu server, alguém poderia me mostrar a solução para eu arrumar sozinho posteriormente sempre que acontecer? Vou postar dois desses scripts que estão dando erro para eu utilizar como exemplo e se puderem dar aquele help eu agradeceria Está surgindo algum erro? Se sim coloque-o aqui. Citar [Error - Spell Interface] data/spells/scripts/personagem/hashirama/6.lua:onCastSpell Description: (LuaInterface::luaGetPlayerFlagValue) Player not found Citar [Error - Spell Interface] data/spells/scripts/personagem/hashirama/7.lua:onCastSpell Description: (LuaInterface::luaGetPlayerFlagValue) Player not found Citar [Error - Spell Interface] data/spells/scripts/personagem/hashirama/8.lua:onCastSpell Description: (LuaInterface::luaGetPlayerFlagValue) Player not found Citar [Error - Spell Interface] data/spells/scripts/personagem/hashirama/9.lua:onCastSpell Description: (LuaInterface::luaGetPlayerFlagValue) Player not found Você tem o código disponível? Se tiver publique-o aqui: 6.lua local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_BROWN) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 0) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -6.0, -1400, -6.0, -1600) arr1 = { {3} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end function onCastSpell(cid, var) local waittime = 1 -- Tempo de exhaustion local storage = 8214 if exhaustion.check(cid, storage) then doPlayerSendChannelMessage(cid, "Aguarde ".. exhaustion.get(cid, storage) .. " segundos para usar o jutsu novamente.") return false end local parameters = { cid = cid, var = var} local target = getCreatureTarget(cid) -- efeito no alvo local pos = getCreaturePosition(target) local poz = getCreaturePosition(cid) -- effeito no caster addEvent(doSendMagicEffect, 25, {x = pos.x, y = pos.y+1, z = pos.z}, 384) addEvent(doSendMagicEffect, 500, {x = pos.x+1, y = pos.y+1, z = pos.z}, 38) addEvent(onCastSpell1, 500, parameters) exhaustion.set(cid, storage, waittime) return true end 7.lua local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_BROWN) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 28) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -9.0, -1600, -9.0, -1800) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) function onCastSpell(cid, var) local positionME = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(positionME, 28) local waittime = 2 local storage = 8202 if exhaustion.check(cid, storage) then return false end local p = getCreaturePosition(cid) local x = { [0] = {x=p.x+1, y=p.y-1, z=p.z}, [1] = {x=p.x+5, y=p.y+1, z=p.z}, [2] = {x=p.x+1, y=p.y+5, z=p.z}, [3] = {x=p.x-1, y=p.y+1, z=p.z} } local y = { [0] = 229, [1] = 226, [2] = 228, [3] = 227 } pos = x[getCreatureLookDirection(cid)] eff = y[getCreatureLookDirection(cid)] doSendMagicEffect(pos, eff) exhaustion.set(cid, storage, waittime) doCombat(cid, combat1, var) end
Postado Setembro 14, 2022 2 anos Em 13/09/2022 em 23:12, katumblo disse: local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end basicamente em função com delay, precisa checar se o cid ainda ta vivo pra executar, se n ele retorna erro mesmo local function onCastSpell1(parameters) if isCreature(parametes.cid) then return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end end se possível posta a linha do XML dessas spells pf
Postado Setembro 14, 2022 2 anos Autor Solução Em 14/09/2022 em 01:14, FeeTads disse: basicamente em função com delay, precisa checar se o cid ainda ta vivo pra executar, se n ele retorna erro mesmo local function onCastSpell1(parameters) if isCreature(parametes.cid) then return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end end se possível posta a linha do XML dessas spells pf Aqui está: Spell 6: <instant name="For Attack" words="Mokuton Mokuryuy" lvl="50" mana="150" aggressive="1" range="5" blockwalls="1" needtarget="1" exhaustion="2000" needlearn="0" event="script" value="personagem/hashirama/6.lua"> <vocation id="11"/> <vocation id="1110"/> <vocation id="1120"/> <vocation id="1130"/> <vocation id="1140"/> </instant> Spell 7: <instant name="For Attack" words="Gosoju no Jutsu" lvl="60" mana="300" prem="0" exhaustion="2000" direction="1" event="script" value="personagem/hashirama/7.lua"> <vocation id="11"/> <vocation id="1110"/> <vocation id="1120"/> <vocation id="1130"/> <vocation id="1140"/> </instant> [EDIT] @FeeTads Coloquei do jeito que você falou pra por, mas da o mesmo erro e +1 de brinde agora ?: [Error - Spell Interface] data/spells/scripts/personagem/hashirama/6.lua:onCastSpell Description: (LuaInterface::luaGetPlayerFlagValue) Player not found [Error - Spell Interface] In a timer event called from: data/spells/scripts/personagem/hashirama/6.lua:onCastSpell Description: data/spells/scripts/personagem/hashirama/6.lua:17: attempt to index global 'parametes' (a nil value) stack traceback: data/spells/scripts/personagem/hashirama/6.lua:17: in function <data/spells/scripts/personagem/hashirama/6.lua:16> [EDIT] Encontrei a solução! O problema estava no arquivo de exaust, aqui ta como deixei ele para caso alguém no futuro venha procurar: exhaustion = { check = function(cid, storage) if isMonster(cid) then return false end if (getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end return getPlayerStorageValue(cid, storage) >= os.time() end, get = function(cid, storage) if isMonster(cid) then return false end if (getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end local exhaust = getPlayerStorageValue(cid, storage) if (exhaust > 0) then local left = exhaust - os.time() if (left >= 0) then return left end end return false end, set = function(cid, storage, time) if isMonster(cid) then return end setPlayerStorageValue(cid, storage, os.time() + time) end, make = function(cid, storage, time) local exhaust = exhaustion.get(cid, storage) if (not exhaust) then exhaustion.set(cid, storage, time) return true end return false end } Muitissimo obrigado novamente pelo apoio @FeeTads Editado Setembro 14, 2022 2 anos por katumblo (veja o histórico de edições)
Postado Setembro 14, 2022 2 anos Em 14/09/2022 em 01:16, katumblo disse: attempt to index global 'parametes' escrevi "parametes" em vez de "parameteRs" kkkkkkkk, mas boa mano, imaginava ser no check.exhaust
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.