Ir para conteúdo

[SQLite] -=[TFS]=- 0.4 8.60 ERRO NO SCRIPT --[MultipleExp System]-- [CREATURESCRIPT]

Featured Replies

Postado

TFS 0.4 8.60 [Creaturescript] Erro em Console --[MultipleExp System]--

 

 

<event type="login" name="MultipleExp" event="script" value="MultipleExpLogin.lua"/>

 

function onLogin(cid)
    local playersOnline = getPlayersOnline()
    local premiumRate = 1.5 -- Altere conforme a taxa de experiência para premium
    local vipRate = 4.0 -- Altere conforme a taxa de experiência para VIP

    local playerLevel = getPlayerLevel(cid)
    local baseExp = 99999 -- Altere conforme a experiência base

    local onlinePlayersString = "" -- Inicializa uma string vazia para armazenar os nomes dos jogadores online

    for _, player in pairs(playersOnline) do
        onlinePlayersString = onlinePlayersString .. getPlayerName(player) .. ", " -- Concatena os nomes dos jogadores
    end

    local playerIsPremium = isPremium(cid)
    local playerIsVip = getPlayerStorageValue(cid, 13545) == 1

    if playerIsPremium then
        baseExp = baseExp * premiumRate
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online: " .. onlinePlayersString .. "\nSeu Exp Foi Patch For: (" .. baseExp .. "x + 100%)")
    elseif playerIsVip then
        baseExp = baseExp * vipRate
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online: " .. onlinePlayersString .. "\nSeu Exp Foi Patch For: (" .. baseExp .. "x + 300%)")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online: " .. onlinePlayersString .. "\nSeu Exp Foi Patch For: (" .. baseExp .. "x + 0%)")
    end
end

 

[17/10/2023 11:50:16] [Error - CreatureScript Interface]
[17/10/2023 11:50:16] data/creaturescripts/scripts/MultipleExpLogin.lua:onLogin
[17/10/2023 11:50:16] Description:
[17/10/2023 11:50:16] data/creaturescripts/scripts/MultipleExpLogin.lua:16: attempt to concatenate local 'playersOnline' (a table value)
[17/10/2023 11:50:16] stack traceback:
[17/10/2023 11:50:16]     data/creaturescripts/scripts/MultipleExpLogin.lua:16: in function <data/creaturescripts/scripts/MultipleExpLogin.lua:1>
[17/10/2023 11:50:16] Account Manager has logged out.

[17/10/2023 11:50:16] [Error - CreatureScript Interface]
[17/10/2023 11:50:16] In a timer event called from:
[17/10/2023 11:50:16] data/creaturescripts/scripts/login.lua:onLogin

 

Resolvido por Imperius

Ir para solução

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