Ir para conteúdo

Featured Replies

Postado

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.

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo