Page 1 of 1

Can't Print To Output During Gameplay with Zerobrane

Posted: Wed Nov 26, 2014 7:05 am
by SolarLune
Hey, there. Been awhile since I was around here.

I'm looking into Lua and Love again, and I've got Zerobrane for an IDE. I've got a basic script running to print text to ZB's console, but it only does that after the program exits. I've made an exception in the firewall and tried redirecting the output in the console in the user preferences lua file; no effect there. Any ideas? Stopping and restarting the debug server doesn't work, either.

Re: Can't Print To Output During Gameplay with Zerobrane

Posted: Wed Nov 26, 2014 9:07 am
by s-ol
Löve2D has buffered output so it doesn't lag bc of it, but you can turn it off:

Code: Select all

io.stdout:setvbuf("no")

Re: Can't Print To Output During Gameplay with Zerobrane

Posted: Wed Nov 26, 2014 4:11 pm
by SolarLune
Thanks for the tip, that was it.

Re: Can't Print To Output During Gameplay with Zerobrane

Posted: Sun Nov 30, 2014 4:25 am
by paulclinger
@SolarLune, that's the right advice; I added this to the FAQ for ZBS: http://studio.zerobrane.com/doc-faq.htm ... put-window

Re: Can't Print To Output During Gameplay with Zerobrane

Posted: Wed Feb 25, 2015 9:07 pm
by zell2002
this hasnt worked for me
where do you place this ?

Re: Can't Print To Output During Gameplay with Zerobrane

Posted: Wed Feb 25, 2015 10:48 pm
by s-ol
zell2002 wrote:this hasnt worked for me
where do you place this ?
Wherever, but usually atop main.lua