[HELP] Connection rejected by server: There was an error loading your character! Error code: identifier-missing The cause of this error is not known, your identifier could not be found

I’m trying to import my dev server on fxdk but I can’t connect to my server cuz I’m getting in my console this error :
image

1 Like

@pink-pepper did we ever get this convar for fake identifiers? :o

1 Like

What ?

PS: All scripts loaded on the fxdk project, are working well on a normal test server (not launched with fxdk)

Is steam running on the client machine and do you have the Steam web API defined in the server.cfg file?

Yes (in the blank.cfg)

This is exactly what’s wrong.

1 Like

Could u explain ?

Right, see the docs page: FxDK → Resources # No player identifiers

In FxDK environment you don’t have access to player identifiers, yet, see this GitHub issue for more information: SDK: add sign-in flow · Issue #865 · citizenfx/fivem · GitHub.

Until it gets implemented, please use sv_fxdkMode convar to tweak your code so it can distinguish if player identifiers available. It will be set to integer 1 when running in FxDK.

Use it like this:

local fxdkMode = GetConvarInt('sv_fxdkMode', 0) == 1
1 Like

Example for onPlayerJoined from ESX-Legacy

local fxdkMode = GetConvarInt('sv_fxdkMode', 0) == 1

function onPlayerJoined(playerId)

	local identifier = (fxdkMode == 0 and ESX.GetIdentifier(playerId)) or 'FXDKID'
	if identifier then
		if ESX.GetPlayerFromIdentifier(identifier) then
			DropPlayer(playerId, ('there was an error loading your character!\nError code: identifier-active-ingame\n\nThis error is caused by a player on this server who has the same identifier as you have. Make sure you are not playing on the same Rockstar account.\n\nYour Rockstar identifier: %s'):format(identifier))
		else
			local result = MySQL.scalar.await('SELECT 1 FROM users WHERE identifier = ?', { identifier })
			if result then
				loadESXPlayer(identifier, playerId, false)
			else
				createESXPlayer(identifier, playerId)
			end
		end
	else
		DropPlayer(playerId, 'there was an error loading your character!\nError code: identifier-missing-ingame\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.')
	end
end

i have a similar problem but no one knows how to fix it.
After this error appears the server restarts

That’s not even FxDK. Why are you hijacking an entirely unrelated topic?

sorry, i didnt even noticed, i was just trying to find some help