Postado Outubro 7, 2016 8 anos Meu task system possue o seguinte script: function onKill(cid, target, lastHit) local started = getPlayerStartedTasks(cid) if isPlayer(target) or isSummon(target) then return true end if started and #started > 0 then for _, id in ipairs(started) do if isInArray(tasks[id].creatures, getCreatureName(target):lower()) then if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < 0 then doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0) end if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < tasks[id].killsRequired then doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) .. "/" .. tasks[id].killsRequired .. " " .. tasks[id].raceName .. " already killed.") end end end end return true end Estranhamente em algum loop de operações o codigo adiciona STRING na storage e buga todo o sistema. Isso acontece aleatoriamente, alguém já conseguiu corrigir esse problema? Ele claramente não adiciona string nenhuma.. porém acontece esse erro: [Error - CreatureScript Interface] data/creaturescripts/scripts/killinginthenameof.lua:onKill Description: data/creaturescripts/scripts/killinginthenameof.lua:8: attempt to compare string with number stack traceback: data/creaturescripts/scripts/killinginthenameof.lua:8: in function <data/creaturescripts/scripts/killinginthenameof.lua:1> E os monstros bugam (Ficam sem vida e não morre), e acaba bugando completamente minha task.
Postado Outubro 8, 2016 8 anos Provavelmente tem algum outro sistema no seu servidor, que está programado para salvar STRING nessa mesma storage. Já verificou isso?
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.