print to console?

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.
Post Reply
pippy
Prole
Posts: 1
Joined: Fri Dec 10, 2010 9:57 am

print to console?

Post by pippy »

Hi, I'm new to love2d. I use pygame, just want to see how pygame stacks up.

Is there a way to print to console on Mac OS X:

Code: Select all

write("hello world!")
This results in:

Code: Select all

Error: [string "main.lua"]:7: attempt to call global 'write' (a nil value)
Is there an alternative to printing to console (aside from writing to a file and using tail -f)?


Edit: I'm an idiot. It's print(), not write(). Never take forum snippets as gospel.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: print to console?

Post by zac352 »

I'd like to note that if you're running windows, you have to open a separate window.
For the console in Linux/Mac, you have to run from the terminal. ;)
Hello, I am not dead.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 5 guests