diff --git a/ulc/server/s_main.lua b/ulc/server/s_main.lua index 4348db2..b0ad6f3 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", '^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 + 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 @@ -368,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)