[HELP] How to require lua file/module correctly in FiveM context

I’ve managed to include a lua list (inside loadouts.lua) into one of my client_scripts (preconditions.lua) by declaring the list as a global variable.
But is there any other way to import this list (loadouts.lua) into my client_script (preconditions.lua) without using globals?
requiring the list as a module doesnt work, see -> https://gist.github.com/DATADEER/df4f58d07ea6ba31a93558f3a366acaa

(sorry for posting this into the Technical Support Channel, but for some reason i can’t create new posts in Development & Modding -> Discussions)

Thanks for any help and hints :slight_smile:

Hello, @DATADEER! Your question would be better helped in #development:scripts! I will flag your post so that I can be moved to the appropriate area.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.