Page 1 of 1

print to console?

Posted: Fri Dec 10, 2010 10:04 am
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.

Re: print to console?

Posted: Fri Dec 10, 2010 12:34 pm
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. ;)