GTA V version?
latest Up to date?
yes Legit or Pirate copy?
legit obviously Steam/CD/Social Club?
Social Club Windows version?
10 x64 creators update, but server is running on linux(idk the distro or version) Did you try to delete caches.xml and try again?
no, i didn’t Error screenshot (if any)
the classic “legacy servers are incompatible” error, no need for screenshots System specifications
i don’t think this is relevant What did you do to get this issue?
i’ve updated my server to the latest version What server did you get this issue on?
mine. CitizenFX.log file
normal server logs, nothing out of the ordinary .dmp files/report IDs
i’ve updated my server 7 times, it works the first time i try, but if i leave and rejoin the error keeps popping up, until i restart fivem multiple times and again it’ll work for another connection. every user has been experiencing this for the past day on my server. can someone help me?
Well in that case try to contact them and ask for their support. I’d say that’s your best bet, unless someone else here has a clue of what the issue could be.
Not sure, possibly (?). You could try to disable them all and see if you can join, if you can then it’s probably a resource. Then just start your resources one by one and rejoin and see if it fails, the latest enabled resource is the cause.
thanks a lot, i ended up doing what you told me and i’ve found out that a while true do loop was causing the error, do you have any idea on why this would happen?
local Proxy = module("vrp", "lib/Proxy")
RegisterServerEvent('datastore')
AddEventHandler('datastore', function(PlayerName, x, y, z, user_id, siren)
local value = '{ "x":' ..'"' .. x .. '"' .. ', "y":' .. '"' .. y .. '"' .. ', "z":' .. '"' .. z .. '"' .. ', "online":true, "username":'.. '"' .. PlayerName .. '"' ..', "id":' .. user_id .. ', "siren": "'.. siren ..'" }'
print(value)
vRP.setUData(user_id,"cad",value)
end)
print("CAD HAS BEEN LOADED")
print('vrp connected to the database, ready to stream game data to db.')
AddEventHandler("vRP:playerSpawn", function(user_id, source, first_spawn)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
id = user_id
local players = GetPlayers()
TriggerClientEvent("coords", -1, user_id)
end
end)
end)
AddEventHandler("vRP:playerLeave",function(user_id, source)
local value = "NOT ONLINE"
vRP.setUData(user_id,"cad",value)
end)
client script
RegisterNetEvent("coords")
AddEventHandler("coords", function(user_id)
x,y,z = table.unpack(GetEntityCoords(GetPlayerPed(-1),true))
PlayerName = GetPlayerName(GetPlayerServerId(PlayerId()))
p = source
siren = 'novehicle'
if IsPedOnVehicle(GetPlayerPed(-1)) then
local vehicle = GetVehiclePedIsIn(GetPlayerPed(-1), false)
siren=IsVehicleSirenOn(vehicle)
if siren then
siren="true"
elseif not siren then
siren="false"
end
end
TriggerServerEvent("datastore", PlayerName, x, y, z, user_id, siren)
end)
While true loops should not be used inside the main thread, this will cause everything to freeze hence you’re not able to join because the server can’t respond to your requests. You should put while loops inside a new thread
nvm didn’t see that it’s already inside a new thread.
Not 100% sure on this, someone please correct me if I’m wrong, but I believe that while loops are not supported in server scripts. They should only be used in a new thread inside a client script.