Page 1 of 2

Windows: conf.lua console appears but doesn't work

Posted: Fri Feb 22, 2013 3:38 am
by B-Man99
Hello. I am on a windows 7 computer (I have tried with both laptop and desktop), and I enabled the console in conf.lua. The console appears, but the print() command from my .love code doesn't work, and I cannot type anything into the console despite a flashing type-bar-thingy showing up. I have tried using other ways of opening the console, but they all do the same thing. The only thing that will show up on the console is the error message displayed if love2d blue-screens. Does anyone know if this is fixable? Scroll down to my next post for details. This is still unsolved...

Edit: Still unsolved. I haven't stopped paying attention. I was hoping for some kind of answer. My post below gives info on my computer.

Edit: Kind of fixed. love._openConsole works for me, but I can't type anything into the console directly. Thank you for all of the help!

Re: Windows: conf.lua console appears but doesn't work

Posted: Fri Feb 22, 2013 7:22 am
by bartbes
Are you using any special build, like LoveJIT, or a post-0.8.0 one? Does it have a separate lua.dll?

Re: Windows: conf.lua console appears but doesn't work

Posted: Fri Feb 22, 2013 7:26 am
by Roland_Yonaba
Well, can you post a .love file ? I am on Windows too, I can try and give some pointers.

Re: Windows: conf.lua console appears but doesn't work

Posted: Fri Feb 22, 2013 3:30 pm
by B-Man99
I am using Love 0.8.0, the normal one, and I have tried this with everything from my own .love files to Mari0 (stabyourself.net) and Platform Guy (from these forums).

Windows 7 Home Premium, Dell Inspiron 560, Pentium Dual-Core CPU 4 GB RAM for the desktop (64 bit OS)
Not very similar for the laptop (Win7, Single-Core, Probably 4 GB RAM, 32 Bit OS)

This problem occurs with both graphics cards on my desktop.
The only thing major that is the same between these computers is Windows 7 Home Premium, and Dell as a manufacturer

Re: [Unsolved]Windows: conf.lua console appears but doesn't

Posted: Wed Apr 17, 2013 7:00 pm
by B-Man99
Still waiting...

Re: [Unsolved]Windows: conf.lua console appears but doesn't

Posted: Wed Apr 17, 2013 7:10 pm
by markgo
Are you printing before love gets initialized? Nothing will show up in the console until love.run is called. It's an issue in Windows, but I'm not sure about other platforms.

main.lua

Code: Select all

print 'this will not show up'
function love.load()
  print 'this will show up'
end

Re: [Unsolved]Windows: conf.lua console appears but doesn't

Posted: Wed Apr 17, 2013 9:30 pm
by Ref
I'm on Windows 7 and this works for me!

Re: [Unsolved]Windows: conf.lua console appears but doesn't

Posted: Thu Apr 18, 2013 11:26 am
by Boolsheet
Like the others said, the console on Windows gets opened after main.lua has been loaded and before love.load gets called. And like Ref showed in his example, it's possible to use the function at love._openConsole to open it yourself. If you do that at the top of main.lua, everything should be printed.

To access stdin you have to use io.stdin:read or just io.read (the default input handle is stdin). This is a blocking function. It will stop the execution of the program until the user confirms with the return key.

Re: [Unsolved]Windows: conf.lua console appears but doesn't

Posted: Thu Apr 18, 2013 6:47 pm
by B-Man99
Okay. The love._openConsole is working for me, I wasn't aware of that trick. using conf.lua still doesn't open a functional console though, but love._openConsole solves most of my problems anyway. The only thing that hasn't been fixed by this is that I still can't type anything into the console, which I am not sure whether you are supposed to be able to do or not. Thanks for all of the help!

Re: Windows: conf.lua console appears but doesn't work

Posted: Thu Apr 18, 2013 6:55 pm
by T-Bone
You still haven't uploaded a .love containing the code that doesn't work for you. love.conf should be enough.

If you upload it, we can probably tell what's wrong.