Ir para conteúdo
  • Cadastre-se

(Resolvido)[ERRO] /reload


Ir para solução Resolvido por KotZletY,

Posts Recomendados

Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website).

OTX 3.0

Base: 

TFS 1.2

 

Qual erro está surgindo/O que você procura?

Ao dar /reload monsters

 

Lua Script Error: [TalkAction Interface] 
data/talkactions/scripts/reload.lua:onSay 
data/talkactions/scripts/reload.lua:73: attempt to call field 'reload' (a nil value) 
stack traceback: 
[C]: in function 'reload' 
data/talkactions/scripts/reload.lua:73: in function

 

Você tem o código disponível? Se tiver publique-o aqui:

local reloadTypes = {
	["all"] = { targetType = RELOAD_TYPE_ALL, name = "all" },

	["action"] = { targetType = RELOAD_TYPE_ACTIONS, name = "actions" },
	["actions"] = { targetType = RELOAD_TYPE_ACTIONS, name = "actions" },

	["chat"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" },
	["channel"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" },
	["chatchannels"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" },

	["config"] = { targetType = RELOAD_TYPE_CONFIG, name = "config" },
	["configuration"] = { targetType = RELOAD_TYPE_CONFIG, name = "config" },

	["creaturescript"] = { targetType = RELOAD_TYPE_CREATURESCRIPTS, name = "creature scripts" },
	["creaturescripts"] = { targetType = RELOAD_TYPE_CREATURESCRIPTS, name = "creature scripts" },

	["events"] = { targetType = RELOAD_TYPE_EVENTS, name = "events" },

	["global"] = { targetType = RELOAD_TYPE_GLOBAL, name = "global.lua" },

	["globalevent"] = { targetType = RELOAD_TYPE_GLOBALEVENTS, name = "globalevents" },
	["globalevents"] = { targetType = RELOAD_TYPE_GLOBALEVENTS, name = "globalevents" },

	["items"] = { targetType = RELOAD_TYPE_ITEMS, name = "items" },

	["monster"] = { targetType = RELOAD_TYPE_MONSTERS, name = "monsters" },
	["monsters"] = { targetType = RELOAD_TYPE_MONSTERS, name = "monsters" },

	["mount"] = { targetType = RELOAD_TYPE_MOUNTS, name = "mounts" },
	["mounts"] = { targetType = RELOAD_TYPE_MOUNTS, name = "mounts" },

	["move"] = { targetType = RELOAD_TYPE_MOVEMENTS, name = "movements" },
	["movement"] = { targetType = RELOAD_TYPE_MOVEMENTS, name = "movements" },
	["movements"] = { targetType = RELOAD_TYPE_MOVEMENTS, name = "movements" },

	["npc"] = { targetType = RELOAD_TYPE_NPCS, name = "npcs" },
	["npcs"] = { targetType = RELOAD_TYPE_NPCS, name = "npcs" },

	["quest"] = { targetType = RELOAD_TYPE_QUESTS, name = "quests" },
	["quests"] = { targetType = RELOAD_TYPE_QUESTS, name = "quests" },

	["raid"] = { targetType = RELOAD_TYPE_RAIDS, name = "raids" },
	["raids"] = { targetType = RELOAD_TYPE_RAIDS, name = "raids" },

	["spell"] = { targetType = RELOAD_TYPE_SPELLS, name = "spells" },
	["spells"] = { targetType = RELOAD_TYPE_SPELLS, name = "spells" },

	["talk"] = { targetType = RELOAD_TYPE_TALKACTIONS, name = "talk actions" },
	["talkaction"] = { targetType = RELOAD_TYPE_TALKACTIONS, name = "talk actions" },
	["talkactions"] = { targetType = RELOAD_TYPE_TALKACTIONS, name = "talk actions" },

	["weapon"] = { targetType = RELOAD_TYPE_WEAPONS, name = "weapons" },
	["weapons"] = { targetType = RELOAD_TYPE_WEAPONS, name = "weapons" }
}

function onSay(player, words, param)
	if not player:getGroup():getAccess() then
		return true
	end

	if player:getAccountType() < ACCOUNT_TYPE_GOD then
		return false
	end

	logCommand(player, words, param)

	local reloadType = reloadTypes[param and param:lower()]
	if not reloadType then
		player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Reload type not found.")
		return false
	end

	Game.reload(reloadType.targetType)
	player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, string.format("Reloaded %s.", reloadType.name))
	return false
end
 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

Otserver Global - Open Tibia

angera.servegame.com

Link para o post
Compartilhar em outros sites
  • Respostas 12
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

local reloadTypes = { ["all"] = { targetType = RELOAD_TYPE_ALL, name = "all" }, ["action"] = { targetType = RELOAD_TYPE_ACTIONS, name = "actions" }, ["actions"] = { targetType = RELOAD_TYPE_ACTIONS, name = "actions" }, ["chat"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" }, ["channel"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" }, ["chatchannels"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" }, ["config"] = { targetType = RELOAD_TYPE_CONFIG, name

remove esse script(talk) e tag do eu servidor e depois tente usar o /reload   porque esse comando /reload agora foi jogado para sources   então você está duplicando esse comando no servidor..

Encontre esse diretório no seu servidor data/lib e poste todo o script do arquivo 000-constant.lua nesse tópico.

local reloadTypes = {
	["all"] = { targetType = RELOAD_TYPE_ALL, name = "all" },

	["action"] = { targetType = RELOAD_TYPE_ACTIONS, name = "actions" },
	["actions"] = { targetType = RELOAD_TYPE_ACTIONS, name = "actions" },

	["chat"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" },
	["channel"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" },
	["chatchannels"] = { targetType = RELOAD_TYPE_CHAT, name = "chatchannels" },

	["config"] = { targetType = RELOAD_TYPE_CONFIG, name = "config" },
	["configuration"] = { targetType = RELOAD_TYPE_CONFIG, name = "config" },

	["creaturescript"] = { targetType = RELOAD_TYPE_CREATURESCRIPTS, name = "creature scripts" },
	["creaturescripts"] = { targetType = RELOAD_TYPE_CREATURESCRIPTS, name = "creature scripts" },

	["events"] = { targetType = RELOAD_TYPE_EVENTS, name = "events" },

	["global"] = { targetType = RELOAD_TYPE_GLOBAL, name = "global.lua" },

	["globalevent"] = { targetType = RELOAD_TYPE_GLOBALEVENTS, name = "globalevents" },
	["globalevents"] = { targetType = RELOAD_TYPE_GLOBALEVENTS, name = "globalevents" },

	["items"] = { targetType = RELOAD_TYPE_ITEMS, name = "items" },

	["monster"] = { targetType = RELOAD_TYPE_MONSTERS, name = "monsters" },
	["monsters"] = { targetType = RELOAD_TYPE_MONSTERS, name = "monsters" },

	["modules"] = { targetType = RELOAD_TYPE_MODULES, name = "modules" },
	["mod"] = { targetType = RELOAD_TYPE_MODULES, name = "modules" },

	["mount"] = { targetType = RELOAD_TYPE_MOUNTS, name = "mounts" },
	["mounts"] = { targetType = RELOAD_TYPE_MOUNTS, name = "mounts" },

	["move"] = { targetType = RELOAD_TYPE_MOVEMENTS, name = "movements" },
	["movement"] = { targetType = RELOAD_TYPE_MOVEMENTS, name = "movements" },
	["movements"] = { targetType = RELOAD_TYPE_MOVEMENTS, name = "movements" },

	["npc"] = { targetType = RELOAD_TYPE_NPCS, name = "npcs" },
	["npcs"] = { targetType = RELOAD_TYPE_NPCS, name = "npcs" },

	["quest"] = { targetType = RELOAD_TYPE_QUESTS, name = "quests" },
	["quests"] = { targetType = RELOAD_TYPE_QUESTS, name = "quests" },

	["raid"] = { targetType = RELOAD_TYPE_RAIDS, name = "raids" },
	["raids"] = { targetType = RELOAD_TYPE_RAIDS, name = "raids" },

	["spell"] = { targetType = RELOAD_TYPE_SPELLS, name = "spells" },
	["spells"] = { targetType = RELOAD_TYPE_SPELLS, name = "spells" },

	["talk"] = { targetType = RELOAD_TYPE_TALKACTIONS, name = "talk actions" },
	["talkaction"] = { targetType = RELOAD_TYPE_TALKACTIONS, name = "talk actions" },
	["talkactions"] = { targetType = RELOAD_TYPE_TALKACTIONS, name = "talk actions" },

	["weapon"] = { targetType = RELOAD_TYPE_WEAPONS, name = "weapons" },
	["weapons"] = { targetType = RELOAD_TYPE_WEAPONS, name = "weapons" }
}

function onSay(player, words, param)
	if not player:getGroup():getAccess() then
		return true
	end

	if player:getAccountType() < ACCOUNT_TYPE_GOD then
		return false
	end

	logCommand(player, words, param)

	local reloadType = reloadTypes[param and param:lower()]
	if not reloadType then
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Reload type not found.")
		return false
	end

	Game.reload(reloadType.targetType)
	player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("Reloaded %s.", reloadType.name))
	return false
end

(Esse é o que eu uso atualmente em meu servidor...)

@amora murder 

Tag:

<talkaction words="/reload" separator=" " script="reload.lua" />

 

Link para o post
Compartilhar em outros sites

@tataboy67 Engraçado que nossos scripts estão iguais. Única diferença é que o seu tem reload pra modules e a mensagem de "reload type not found".

 

Inclusive, a linha que acusa erro aqui está igualzinha na sua

Game.reload(reloadType.targetType)

 

Otserver Global - Open Tibia

angera.servegame.com

Link para o post
Compartilhar em outros sites

Então eu não sei amigo... realmente aqui está funcionando perfeitamente !
(OTX 3.0 - Malucooo) TFS 1.3

Link para o post
Compartilhar em outros sites
6 minutos atrás, tataboy67 disse:

Então eu não sei amigo... realmente aqui está funcionando perfeitamente !
(OTX 3.0 - Malucooo) TFS 1.3

Uai cara... Não tem lógica! Uso otx 3.0 do malucooo também

Otserver Global - Open Tibia

angera.servegame.com

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96851
    Tópicos
    519616
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo