I'm trying to to use require() to get the data from the other lua files next to my main file but I only get an error that Fusion can't find that file.
The problem is that Fusion is looking inside the Modules\Lua folder and not right next to my main file as it should do (when looking on lua-information out there).
Are there any way to make Fusion look for the file right next to my main LUA file or am I doomed and have to move my extra files to Modules\Lua?
I wonder where it's looking for the file...
- Posts: 1313
- Joined: Wed Nov 26, 2014 8:04 pm
- Location: Los Angeles, CA, USA
- Been thanked: 117 times
==package.pathin a Console.
If it is not there, add to your script
did wonders! Exactly what I wanted it to do.
To make my life easier I added this to my code to make it more portable:
Note that local variables will be local to that file only and can't be read by the main lua file or other requested files (as it should be) and requested files can't read variabels from the main file, local or not.