Postado Agosto 18, 2018 6 anos Erro : data/lib/amoebaTask.lua:28: in function 'taskKills' data/creaturescripts/scripts/amoebaTaskCreature.lua:9: in function <data/creaturescripts/scripts/amoebaTaskCreature.lua:1> Quando um player ataca um mostro da task ela retorna esse erro no otx, e o mostro fica bugado e não MORRE Creaturescript: function onKill(cid, target, lastHit) if not isMonster(target) then return true end for _, tasks in pairs(amoebaTask) do if isInArray(tasks.creatures, getCreatureName(target)) then if taskKills(cid, tasks.storagecount) < tasks.count then doPlayerSetStorageValue(cid, tasks.storagecount, taskKills(cid, tasks.storagecount)+1) break end end end return true end LINHA DO ERRO : if taskKills(cid, tasks.storagecount) < tasks.count then LIB : function taskKills(cid, storage) local kills = getPlayerStorageValue(cid, storage) return kills < 0 and 0 or kills end LINHA DO ERRO : return kills < 0 and 0 or kills Por favor alguém pode me ajudar a arrumar isso ?
Postado Agosto 20, 2018 6 anos function taskKills(cid, storage) return getPlayerStorageValue(cid, storage) <= 0 and 0 or getPlayerStorageValue(cid, storage) end esse vc altera na lib, deixa a função assim --------------- function onKill(cid, target, lastHit) if isPlayer(target) or not isPlayer(cid) then return true end for _, tasks in pairs(amoebaTask) do if isInArray(tasks.creatures, getCreatureName(target)) then local storage = taskKills(cid, tasks.storagecount) if storage < tasks.count then setPlayerStorageValue(cid, tasks.storagecount, storage+1) break end end end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Agosto 24, 2018 6 anos Autor Em 20/08/2018 em 12:32, Vodkart disse: function taskKills(cid, storage) return getPlayerStorageValue(cid, storage) <= 0 and 0 or getPlayerStorageValue(cid, storage) end esse vc altera na lib, deixa a função assim --------------- function onKill(cid, target, lastHit) if isPlayer(target) or not isPlayer(cid) then return true end for _, tasks in pairs(amoebaTask) do if isInArray(tasks.creatures, getCreatureName(target)) then local storage = taskKills(cid, tasks.storagecount) if storage < tasks.count then setPlayerStorageValue(cid, tasks.storagecount, storage+1) break end end end return true end infelizmente continua o mesmo erro dei rep pela ajuda
Postado Agosto 26, 2018 6 anos Autor Em 25/08/2018 em 14:28, FlavioHulk disse: Tá faltando a tabela amoebaTask... Boa tarde eu não postei a tabela não é isso não sei por que esta dando esse erro acho que é na hora de contar
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.