Hello everyone,
Recently I have decided to try my hands on real programming while making games rather than just depend on Construct 2-like tools. So I thought LOVE (I don't know how to make the two dots on top of the "O" sorry) would be fit for a beginner.
I started following these tutorials and they seem to be really good. However in his first episode he created a conf.lua file and placed it in the main folder along with main.lua.
I did the SAME EXACT thing but the console never appeared. I searched in the forums and it seems there are threads like this one but no real answer in them. I tried one of the solutions inside which is to do a require ("conf") or require("conf.lua") and both didn't work. They produced an error saying there is no conf.lua file in the folder. Except the file is RIGHT THERE next to main.lua.
I have attached the .love file and maybe someone can shed some light to this madness, please.
Thank you very much in advance.
[SOLVED]Conf.lua being ignored even with "required"
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Conf.lua being ignored even with "required"
You have a typo in your function name, so it's never called:
Code: Select all
function love.cof(t)
Re: Conf.lua being ignored even with "required"
I fixed the typo but still the same exact thing happens. The console window doesn't appear.
Thank you very much though for spotting that.
Thank you very much though for spotting that.
Re: Conf.lua being ignored even with "required"
Are you using Windows? Because that option only works for that.
Also, why don't you just simply copy the full list of options from the wiki and change it to what you need? I always start with that.
Also, why don't you just simply copy the full list of options from the wiki and change it to what you need? I always start with that.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Conf.lua being ignored even with "required"
While off-topic, it's important that you realize that require doesn't want file names or paths, it takes module names. Now module names can be turned into paths fairly easily, by replacing every dot with a slash, and then appending '.lua', so you're looking for a file called 'conf/lua.lua' there.Vallar wrote:require("conf.lua") [...] produced an error saying there is no conf.lua file in the folder. Except the file is RIGHT THERE next to main.lua.
Re: Conf.lua being ignored even with "required"
Yes, Windows 7 64 bit. I was following the tutorial since I am just starting out. But when I looked at what is inside the Wiki I found just a few more options that is all. Besides, it appeared in the video why not for me?Are you using Windows? Because that option only works for that...
Now I didn't know that. I thought me including conf.lua was a convention to include the extension of the file. However, when I omit the ".lua" part and just use require("conf") the game runs without errors but the console window doesn't appear.While off-topic, it's important that you realize that require doesn't want file names or paths, it takes module names. Now module names can be turned into...
If I remove the require("conf") all together it doesn't appear still.
How do other people make it appear?
Re: Conf.lua being ignored even with "required"
For the debug console to appear, do the following:Vallar wrote:Yes, Windows 7 64 bit. I was following the tutorial since I am just starting out. But when I looked at what is inside the Wiki I found just a few more options that is all. Besides, it appeared in the video why not for me?Are you using Windows? Because that option only works for that...
Now I didn't know that. I thought me including conf.lua was a convention to include the extension of the file. However, when I omit the ".lua" part and just use require("conf") the game runs without errors but the console window doesn't appear.While off-topic, it's important that you realize that require doesn't want file names or paths, it takes module names. Now module names can be turned into...
If I remove the require("conf") all together it doesn't appear still.
How do other people make it appear?
Code: Select all
function love.conf(t)
t.console = true
end
For anything to appear in that console, do a print (for example in love.load):
Code: Select all
function love.load()
print("Hello, world!")
end
Re: Conf.lua being ignored even with "required"
I have that line of code inside conf.lua already. But still doesn't work and it is set to true as well. That is what is dazzling me. Everything checks out as the wiki and the tutorials I found around but still wouldn't work.
Not sure what I am missing.
Thank you very much nonetheless
Not sure what I am missing.
Thank you very much nonetheless
Re: Conf.lua being ignored even with "required"
Wait, are you using that "play.bat" to start your game? It looks like that's possibly what's keeping the console from opening. I don't know for sure, but try running your game another way.
http://www.love2d.org/wiki/Getting_Star ... ning_Games
http://www.love2d.org/wiki/Getting_Star ... ning_Games
Re: Conf.lua being ignored even with "required"
I tried 4 ways of running the game to be honest:
1- I have Notepad++ with the add-on that was added here on the site so you can get code auto-complete and start the game from Notepad++. So I run it from there. The console doesn't appear.
2- I tried the play.bat method he mentioned in the file and same thing, no console window.
3- I tried dragging the whole folder on the Love.exe in the LOVE installation folder, still no window.
4- Finally I packaged the game up (same package I uploaded to this topic) and tried to run that and still no window.
1- I have Notepad++ with the add-on that was added here on the site so you can get code auto-complete and start the game from Notepad++. So I run it from there. The console doesn't appear.
2- I tried the play.bat method he mentioned in the file and same thing, no console window.
3- I tried dragging the whole folder on the Love.exe in the LOVE installation folder, still no window.
4- Finally I packaged the game up (same package I uploaded to this topic) and tried to run that and still no window.
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 5 guests