Postado Julho 7, 2021 3 anos Boa Galera alguém pode me ajudar com um erro por favor. erro: Citar [4:44:08.914] [Error - Action Interface] [4:44:08.917] data/actions/scripts/other/cave_action.lua:onUse [4:44:08.921] Description: [4:44:08.923] data/actions/scripts/other/cave_action.lua:8: attempt to index fie ld '?' (a nil value) [4:44:08.929] stack traceback: [4:44:08.931] data/actions/scripts/other/cave_action.lua:8: in function <data/ actions/scripts/other/cave_action.lua:1> Script: Citar function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid == caveExclusiva.config.buyItemID then if getPlayerStorageValue(cid, caveExclusiva.storages.cave) > 0 then local caveName = caveExclusiva.caves[getPlayerStorageValue(cid, caveExclusiva.storages.cave)].caveName local timeLeft = getPlayerStorageValue(cid, caveExclusiva.storages.time) - os.time() doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já é dono da cave de ".. caveName ..", aguarde ".. getTimeString(timeLeft) .." para comprar uma cave novamente.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) elseif getGlobalStorageValue(caveExclusiva.caves[itemEx.aid].gStor) > 1 then local ownerGUID = getGlobalStorageValue(caveExclusiva.caves[itemEx.aid].gStor) local ownerTimeLeft = nil if isPlayerOnline(getPlayerNameByGUID(ownerGUID)) then ownerTimeLeft = getPlayerStorageValue(getPlayerByGUID(ownerGUID), caveExclusiva.storages.time) - os.time() else ownerTimeLeft = getOfflinePlayerStorage(ownerGUID, caveExclusiva.storages.time) - os.time() end doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "Esta cave já pertence ao player ".. getPlayerNameByGUID(ownerGUID) ..", restam ".. getTimeString(ownerTimeLeft) .." para a cave estar livre novamente.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) else caveExclusiva.setCaveTo(cid, itemEx.aid) doSendMagicEffect(getThingPos(cid), CONST_ME_FIREWORK_BLUE) doRemoveItem(item.uid) end end return true end
Postado Julho 9, 2021 3 anos Este tópico foi movido para a seção de Suporte Otserv. Meu Curso sobre Programação para OTServer Programando OTServer Peça o seu script! Entre agora mesmo no grupo Developing Conteúdos: Mostrar conteúdo oculto • Cidade [8.60] • Cave de Boss • Widget Gesior • Autoloot 100% • [Old Client] Como Hookar Dll • Configurando VPS Windowns • [Solução] Código Caracteres Especiais Discord: Belmont#7352 Não esqueça do REP+
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.