Help With Folders And Require.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Help With Folders And Require.
So, I'm new to love and programming in general, and need help with something. I created a folder named "Steam" that has 2 files inside it. The files are named "luasteam.dll" and "steam_api64.dll" in case anyone is wondering. Both of these files are files I need to add steam integration into my game, but I wanted to sort things better so I put all of my Steam related files in the already mentioned Steam folder. My issue is I have to type "local steam = require("luasteam")" to get access to all the features I need for my game to go on Steam. If I run this, it gives me an error, because my steam files are not in the same directory. How can I get around this, so I can keep my game organized and still use the Steam files. Also, yes I know I can just put a lua script inside of the steam folder, but I need to access the steam files from scripts outside the folder. Another also, the reason i'm just calling them "steam files" is because I'm having a huge brain fart and can't remember what they are called. I think it's called a library. (Like I said, I'm kinda new, so the terminology may be off.)
Last edited by TypicalHB on Fri Jun 19, 2020 3:22 pm, edited 1 time in total.
Re: Help With Folders And Require.
Change the require call to require("Steam.luasteam"). The module name uses "." as folder separator (instead of "/").
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 9 guests