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

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.
B-Man99
Prole
Posts: 36
Joined: Wed Jul 25, 2012 10:51 pm
Location: Right behind you. I know you looked. Heck, even I looked

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

Post 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!
Last edited by B-Man99 on Thu Apr 18, 2013 6:48 pm, edited 4 times in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes »

Are you using any special build, like LoveJIT, or a post-0.8.0 one? Does it have a separate lua.dll?
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

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

Post by Roland_Yonaba »

Well, can you post a .love file ? I am on Windows too, I can try and give some pointers.
B-Man99
Prole
Posts: 36
Joined: Wed Jul 25, 2012 10:51 pm
Location: Right behind you. I know you looked. Heck, even I looked

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

Post 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
B-Man99
Prole
Posts: 36
Joined: Wed Jul 25, 2012 10:51 pm
Location: Right behind you. I know you looked. Heck, even I looked

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

Post by B-Man99 »

Still waiting...
User avatar
markgo
Party member
Posts: 190
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

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

Post 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
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

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

Post by Ref »

I'm on Windows 7 and this works for me!
Attachments
console.love
Hello World!
(319 Bytes) Downloaded 226 times
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

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

Post 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.
Shallow indentations.
B-Man99
Prole
Posts: 36
Joined: Wed Jul 25, 2012 10:51 pm
Location: Right behind you. I know you looked. Heck, even I looked

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

Post 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!
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

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

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

Who is online

Users browsing this forum: No registered users and 48 guests