From f749e71acfae0b53d5057ee19e358861169fa06e Mon Sep 17 00:00:00 2001 From: ASTROWwwW Date: Mon, 22 Jun 2026 22:51:50 +0200 Subject: [PATCH] fix(es_extended): kick the player when their data fails to load --- [core]/es_extended/server/main.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index f9f272c2..df006369 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -200,6 +200,11 @@ function loadESXPlayer(identifier, playerId, isNew) local result = MySQL.prepare.await(loadPlayer, { identifier }) + if not result then + print(("[^1ERROR^7] esx_core could not load data for identifier ^5%s^7"):format(identifier)) + return DropPlayer(playerId --[[@as string]], "There was an error loading your character!\nError code: data-load-failed\n\nYour character data could not be retrieved. Please reconnect, and contact the server administration team if this keeps happening.") + end + -- Accounts local accounts = result.accounts accounts = (accounts and accounts ~= "") and json.decode(accounts) or {}