Printing to console

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
BitCruncher
Prole
Posts: 3
Joined: Sat Jan 31, 2015 3:57 pm

Printing to console

Post 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.
User avatar
Doctory
Party member
Posts: 441
Joined: Fri Dec 27, 2013 4:53 pm

Re: Printing to console

Post by Doctory »

yes
BitCruncher
Prole
Posts: 3
Joined: Sat Jan 31, 2015 3:57 pm

Re: Printing to console

Post 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
User avatar
HugoBDesigner
Party member
Posts: 403
Joined: Mon Feb 24, 2014 6:54 pm
Location: Above the Pocket Dimension
Contact:

Re: Printing to console

Post by HugoBDesigner »

You need to have conf.lua. Inside it, have:

Code: Select all

function love.conf(t)
	t.console = true
end
@HugoBDesigner - Twitter
HugoBDesigner - Blog
BitCruncher
Prole
Posts: 3
Joined: Sat Jan 31, 2015 3:57 pm

Re: Printing to console

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

Who is online

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