citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.57k stars 2.11k forks source link

Cannot use globbing to import scripts #2795

Open BuddiesTV opened 2 months ago

BuddiesTV commented 2 months ago

What happened?

When importing scripts from other resources using the @ prefix, for e.g. server_script '@test_resource/test/*.lua' it just fail with the error Failed to load script @test_resource/test/*.lua

Expected result

Should be possible to use globbing

Reproduction steps

  1. Create resource
  2. Create another resource that imports from the first resource
  3. Error

Importancy

Slight inconvenience

Area(s)

FXServer, ScRT: Lua

Specific version(s)

Server v1.0.0.9875 win32

Additional information

No response

outsider31000 commented 2 months ago

Is there anywhere documented you can import files from other scripts using the globbing feature? maybe its not an issue its just a feature not implemented?

BuddiesTV commented 2 months ago

Is there anywhere documented you can import files from other scripts using the globbing feature?

No, it's not documented anywhere, but considering that even importing a script from another resource is not documented, I guess its a bug or it was overseen during implementation?

outsider31000 commented 2 months ago

If its not documented you shouldn't be using in my opinion... If there is no where documented that you can use it that way, it's not an issue or a bug but perhaps an assumption of yours, that it should just work?