From 90647eaed9189f4ad026a9ad9877c04f59278533 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 16:45:51 +0000 Subject: [PATCH 1/3] Initial plan From f1599a8fb3a914a6fcdff1906233729266973568 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 16:49:02 +0000 Subject: [PATCH 2/3] Add check for ulc.lua.txt file with error message Co-authored-by: Flohhhhh <48927090+Flohhhhh@users.noreply.github.com> --- ulc/server/s_main.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ulc/server/s_main.lua b/ulc/server/s_main.lua index 4348db2..1dbc99e 100644 --- a/ulc/server/s_main.lua +++ b/ulc/server/s_main.lua @@ -318,6 +318,17 @@ local function LoadExternalVehicleConfig(resourceName) if not data then data = LoadResourceFile(resourceName, "ulc.lua") if not data then + -- Check if user accidentally created ulc.lua.txt instead of ulc.lua + local txtFileData = LoadResourceFile(resourceName, "data/ulc.lua.txt") + if not txtFileData then + txtFileData = LoadResourceFile(resourceName, "ulc.lua.txt") + end + + if txtFileData then + TriggerEvent("ulc:error", '^1ERROR: Found "ulc.lua.txt" file in resource: "' .. resourceName .. '". You need to rename it to "ulc.lua" (without the .txt extension). Make sure file extensions are visible in your file explorer.^0') + return + end + print("Error loading 'ulc.lua' file. Make sure it is at the root of your resource or in the 'data' folder.") TriggerEvent("ulc:error", '^1Could not load external configuration in: "' .. resourceName .. '"^0') return From beff75b7951abaef18b1a7df95f549d41ee9624b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 16:50:59 +0000 Subject: [PATCH 3/3] Fix error message format and variable name bug Co-authored-by: Flohhhhh <48927090+Flohhhhh@users.noreply.github.com> --- ulc/server/s_main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ulc/server/s_main.lua b/ulc/server/s_main.lua index 1dbc99e..b0ad6f3 100644 --- a/ulc/server/s_main.lua +++ b/ulc/server/s_main.lua @@ -325,7 +325,7 @@ local function LoadExternalVehicleConfig(resourceName) end if txtFileData then - TriggerEvent("ulc:error", '^1ERROR: Found "ulc.lua.txt" file in resource: "' .. resourceName .. '". You need to rename it to "ulc.lua" (without the .txt extension). Make sure file extensions are visible in your file explorer.^0') + TriggerEvent("ulc:error", '^1Found "ulc.lua.txt" file in resource: "' .. resourceName .. '". You need to rename it to "ulc.lua" (without the .txt extension). Make sure file extensions are visible in your file explorer.^0') return end @@ -379,7 +379,7 @@ CreateThread(function() for k, v in ipairs(Config.ExternalVehResources) do local resourceState = GetResourceState(v) while resourceState == "starting" do - print("^3[ULC] Waiting for resource: " .. resourceName .. " to load.") + print("^3[ULC] Waiting for resource: " .. v .. " to load.") Wait(100) end LoadExternalVehicleConfig(v)