Help With Folders And Require.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
TypicalHB
Prole
Posts: 8
Joined: Sat Nov 23, 2019 4:20 am

Help With Folders And Require.

Post 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.)
Last edited by TypicalHB on Fri Jun 19, 2020 3:22 pm, edited 1 time in total.
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Help With Folders And Require.

Post by ReFreezed »

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."
TypicalHB
Prole
Posts: 8
Joined: Sat Nov 23, 2019 4:20 am

Re: Help With Folders And Require.

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 23 guests