Legacy Servers Are Incompatible with this version of FiveM, But my server is a FXServer at the latest version

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?

2 Likes

Try downgrading to 1 or 2 older versions and see if that helps. Maybe the newest version contains a bug.

I am on the same server as IceHax and see we can’t do that for the simple fact we use a host and they don’t let us do it.

I am on the same server as IceHax and see we can’t do that for the simple fact we use a host and they don’t let us do it.

Exactly, we’re using low.ms to host the server and they won’t allow us to do that, we’ll have to contact them and ask 'em

2 Likes

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.

We’ve already done that, but thanks a lot for trying to help!

thx for your answer anyways! :slight_smile:

2 Likes

Hey, do you know if it could be one of the scripts to cause it?

1 Like

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.

1 Like

yeah, i’m probably going to try that, thanks a lot!

2 Likes

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?

2 Likes

Show me the code and I’ll take a look at it.

aight, here it is
server script

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)

2 Likes

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.

1 Like

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.

1 Like

i’ll try to convert the loop to be executed client-side tomorrow thank you a lot anyways!!!

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.