Page 1 of 1
Printing to console
Posted: Sat Jan 31, 2015 4:02 pm
by BitCruncher
Hey Guys, first-time LOVE user here.
Since LOVE2D is built on Lua, can I use print() to send debugging info to the console window? I'm running Windows 7 32-bit.
Re: Printing to console
Posted: Sat Jan 31, 2015 4:23 pm
by Doctory
yes
Re: Printing to console
Posted: Sat Jan 31, 2015 4:28 pm
by BitCruncher
Here is my code. When I run this, nothing is printed to the console.
Code: Select all
function love.load ()
love.window.setTitle ("Title Goes Here...")
canUseCanvas = love.graphics.isSupported ("canvas")
print (canUseCanvas)
end
Re: Printing to console
Posted: Sat Jan 31, 2015 5:21 pm
by HugoBDesigner
You need to have conf.lua. Inside it, have:
Code: Select all
function love.conf(t)
t.console = true
end
Re: Printing to console
Posted: Sat Jan 31, 2015 5:33 pm
by BitCruncher
HugoBDesigner wrote:You need to have conf.lua. Inside it, have:
Code: Select all
function love.conf(t)
t.console = true
end
That worked. Thanks.