[Help] Can't treat GetPlayers


#1

Excuse me, its me again…
I got this (server side) :

RegisterServerEvent("Iphone:getPlayers") -- TriggerServerEvent("Iphone:getPlayers")
AddEventHandler("Iphone:getPlayers", function()
    players = GetPlayers()
    TriggerClientEvent("Iphone:rgetPlayers",source, players)    
end)

Then

RegisterNetEvent("Iphone:rgetPlayers")
AddEventHandler("Iphone:rgetPlayers", function(rplayers)
    players = GetPlayers(rplayers)
end)
function GetPlayers(rplayers)
    local players = {}
    Citizen.Trace(tostring(rplayers))
    for i = 1, #rplayers do
        
        Citizen.Trace(tostring(rplayers[i]))
    if rplayers[i] ~= nil then
            table.insert(players, rplayers[i])
        end
    end

    return players    
end

It’s printing the array adress first, then nothing… (#rplayers == 0) = true ?