Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 13, 2025

Users with hidden file extensions create ulc.lua.txt instead of ulc.lua, causing silent failures with generic error messages.

Changes

  • Added ulc.lua.txt detection in LoadExternalVehicleConfig() after ulc.lua lookup fails

    • Checks both root and data/ subdirectory locations
    • Returns early with specific error message instructing user to rename file and enable extension visibility
  • Fixed undefined variable bug at line 382 where resourceName was used instead of loop iterator v in resource loading status message

Behavior

When ulc.lua is missing but ulc.lua.txt exists:

-- Before: generic "Could not load external configuration" error
-- After: "Found 'ulc.lua.txt' file in resource: 'vehicle-pack'. You need to rename it to 'ulc.lua' (without the .txt extension). Make sure file extensions are visible in your file explorer."

Error message format matches existing TriggerEvent("ulc:error", ...) patterns in codebase.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add: Check for ulc.lua.txt to throw warning/error to user</issue_title>
<issue_description>Some people have extensions hidden in their explorers and keep creating files named ulc.lua.txt instead of ulc.lua we should check for this file and warn/error during resource start.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 13, 2025 16:49
Co-authored-by: Flohhhhh <48927090+Flohhhhh@users.noreply.github.com>
Co-authored-by: Flohhhhh <48927090+Flohhhhh@users.noreply.github.com>
Copilot AI changed the title [WIP] Add check for ulc.lua.txt and throw warning to user Add detection and error message for ulc.lua.txt files Dec 13, 2025
Copilot AI requested a review from Flohhhhh December 13, 2025 16:53
@Flohhhhh Flohhhhh marked this pull request as ready for review December 13, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add: Check for ulc.lua.txt to throw warning/error to user

2 participants