Postado Junho 22, 2023 1 ano to usando esse script, porem quanto reloga da esse error no console, alguem poderia ajudar a solucionar esse problema pf TFS 0.4 8.60 Error: Citar [2:59:08.439] [Error - CreatureScript Interface] [2:59:08.439] In a timer event called from: [2:59:08.439] data/creaturescripts/scripts/effect_vocation.lua:onLogin [2:59:08.439] Description: [2:59:08.439] (internalGetPlayerInfo) Player not found when requesting player info #6 Script: Citar local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) if isPlayer(cid) then addEvent(ariseText, 1000, cid) end return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end
Postado Junho 22, 2023 1 ano Diretor Em 22/06/2023 em 06:02, Doidodepeda disse: to usando esse script, porem quanto reloga da esse error no console, alguem poderia ajudar a solucionar esse problema pf TFS 0.4 8.60 Error: Script: local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) if isPlayer(cid) then addEvent(ariseText, 1000, cid) end return true end function onLogin(cid) local player = Player(cid) -- Use a função Player() para obter o objeto do jogador if player then if tab[player:getVocation():getId()] then -- Use player:getVocation():getId() para obter o ID da vocação ariseText(cid) end end return true end
Postado Junho 22, 2023 1 ano Autor Em 22/06/2023 em 14:25, L3K0T disse: local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) if isPlayer(cid) then addEvent(ariseText, 1000, cid) end return true end function onLogin(cid) local player = Player(cid) -- Use a função Player() para obter o objeto do jogador if player then if tab[player:getVocation():getId()] then -- Use player:getVocation():getId() para obter o ID da vocação ariseText(cid) end end return true end o script nao deixa o char logar e da esse error Citar [14:51:19.986] [Error - CreatureScript Interface] [14:51:19.987] data/creaturescripts/scripts/effect_vocation.lua:onLogin [14:51:19.988] Description: [14:51:19.989] data/creaturescripts/scripts/effect_vocation.lua:19: attempt to call global 'Player' (a nil value) [14:51:19.990] stack traceback: [14:51:19.991] data/creaturescripts/scripts/effect_vocation.lua:19: in function <data/creaturescripts/scripts/effect_vocation.lua:18>
Postado Junho 22, 2023 1 ano Diretor Em 22/06/2023 em 17:52, Doidodepeda disse: o script nao deixa o char logar e da esse error local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) if isPlayer(cid) then addEvent(ariseText, 1000, cid) end return true end function onLogin(cid) local player = getPlayerByGUID(cid) if player then if tab[player:getVocation():getId()] then ariseText(cid) end end return true end
Postado Junho 22, 2023 1 ano Autor Em 22/06/2023 em 18:09, L3K0T disse: Perdão é tfs 0.4 não tinha visto local tab = { [4] = 10, -- [vocationID] = número da cor do texto animado [5] = 30, [6] = 50, [7] = 70 } function ariseText(cid) local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) if isPlayer(cid) then addEvent(ariseText, 1000, cid) end return true end function onLogin(cid) local player = getPlayerByGUID(cid) if player then if tab[player:getVocation():getId()] then ariseText(cid) end end return true end Nenhum error, porem nao sai o ''efeito''
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.