Can't Print To Output During Gameplay with Zerobrane

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
SolarLune
Prole
Posts: 6
Joined: Thu Dec 02, 2010 4:01 am
Contact:

Can't Print To Output During Gameplay with Zerobrane

Post 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.
Check out my game development progress on Twitter.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

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

Post 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")

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
SolarLune
Prole
Posts: 6
Joined: Thu Dec 02, 2010 4:01 am
Contact:

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

Post by SolarLune »

Thanks for the tip, that was it.
Check out my game development progress on Twitter.
paulclinger
Party member
Posts: 227
Joined: Thu Jun 28, 2012 8:46 pm

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

Post 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
zell2002
Citizen
Posts: 75
Joined: Sun Feb 23, 2014 9:22 pm

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

Post by zell2002 »

this hasnt worked for me
where do you place this ?
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

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

Post by s-ol »

zell2002 wrote:this hasnt worked for me
where do you place this ?
Wherever, but usually atop main.lua

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests