Ir para conteúdo

Featured Replies

Postado

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

 

esse.png

Resolvido por L3K0T

Ir para solução
  • Respostas 12
  • Visualizações 347
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local tab = {     [4] = 10, -- [vocationID] = número da cor do texto animado     [5] = 30,     [6] = 50,     [7] = 70 } function ariseText(cid)     local texts = {"' .    ,", ".    '

  • local tab = {     [4] = 10, -- [vocationID] = número da cor do texto animado     [5] = 30,     [6] = 50,     [7] = 70 } function ariseText(cid)     if not isPlayer(cid) then -- Verifi

Posted Images

Postado
  • 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:
 

 

esse.png

 

 

 

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
  • 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
  • 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
  • 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.

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