Suporte e Resolução de Problemas

🔧 Problemas Comuns

Variáveis Retornam nil

Possíveis Causas:

  • Autenticação ainda não completada

  • Heartbeat não funcionando

  • Licença inativa ou expirada

Soluções:

-- Aguardar autenticação
if not Authenticated or Authenticated[1] ~= "Liberado" then
    print("⚠️ Aguardando autenticação...")
    return
end

-- Verificar sistema
if not LockSystem or not LockSystem.LCK then
    print("❌ Sistema não carregado")
    return
end

JSON Inválido em LCK_USER_RESOURCES

Soluções:

local function safeParseResources()
    local json_str = LockSystem.LCK.Get("LCK_USER_RESOURCES")
    
    if not json_str or json_str == "" then
        return {}  -- Usuário sem recursos
    end
    
    local success, result = pcall(json.parse, json, json_str)
    if success and type(result) == "table" then
        return result
    end
    
    print("⚠️ JSON inválido, usando array vazio")
    return {}
end

Blacklist por Tampering

Prevenção:

-- ✅ Use SEMPRE a API oficial
local discordId = LockSystem.LCK.Get("LCK_DISCORD_ID")

-- ❌ NUNCA tente modificar ou hackear
-- LCK_DISCORD_ID = "fake"  -- Resulta em blacklist

📞 Quando Contatar Suporte

Entre em contato se:

  • Variáveis sempre retornam nil mesmo com autenticação ok

  • Valores inconsistentes persistem por mais de 10 minutos

  • Blacklist inesperado sem tentativas de tampering

  • Performance significativamente impactada

🐛 Debug e Logs

-- Sistema de debug para desenvolvedores
local function debugLCKSystem()
    print("=== DEBUG LCK SYSTEM ===")
    print("Sistema disponível:", LockSystem and LockSystem.LCK and "✅" or "❌")
    print("Autenticado:", Authenticated and Authenticated[1] or "Não")
    
    if LockSystem and LockSystem.LCK then
        local vars = {
            "LCK_DISCORD_ID",
            "LCK_DISCORD_NAME", 
            "LCK_SHOP_NAME",
            "LCK_CURRENT_RESOURCE",
            "LCK_RESOURCE_VERSION"
        }
        
        for _, var in ipairs(vars) do
            local value = LockSystem.LCK.Get(var)
            print(var .. ":", value or "nil")
        end
    end
    print("=====================")
end

Lembre-se: As variáveis LCK_* são uma ferramenta poderosa para criar experiências personalizadas e sistemas avançados. Use-as de forma responsável e sempre seguindo as práticas de segurança recomendadas!

Atualizado