Page 1 of 1

Help With Folders And Require.

Posted: Fri Jun 19, 2020 2:30 pm
by TypicalHB
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.)

Re: Help With Folders And Require.

Posted: Fri Jun 19, 2020 2:57 pm
by ReFreezed
Change the require call to require("Steam.luasteam"). The module name uses "." as folder separator (instead of "/").

Re: Help With Folders And Require.

Posted: Fri Jun 19, 2020 3:20 pm
by TypicalHB
ReFreezed wrote: Fri Jun 19, 2020 2:57 pm Change the require call to require("Steam.luasteam"). The module name uses "." as folder separator (instead of "/").
Thank you, this helped a lot.