Beginner: Can't run the HelloWorld tutorial

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
User avatar
tv_user
Citizen
Posts: 57
Joined: Sun Aug 12, 2012 4:39 pm
Location: Portugal

Beginner: Can't run the HelloWorld tutorial

Post by tv_user »

Hello,
I'm an absolute beginner when it comes to LOVE and Lua, but I have some previous programming experience. Recently I got a macbook and I searched for a decent 2D engine to play a little bit, and I found this awesome engine (congrats!). The problem is, I downloaded the 0.8.0 version for Mac OS X, and tried to follow the "tutorial" for the stupidly simple HelloWorld program, but (jokes on me), I turned out to be the stupid - I can't get it to work!
Here's what I did:

I created a simple main.txt file with the code

Code: Select all

function love.draw()
    love.graphics.print('Hello World!', 400, 300)
end
and then I changed the file extension to .lua. I dragged the folder where it was (and that contained nothing else), to the LOVE.app I previously downloaded and it keeps giving me the same error: "graphics.lua:1273: Deconding error Invalid UTF-8"

I just don't get it! What am I doing wrong? (or not doing) If it helps, i'm running OS X Lion 10.7.4

Thanks in advance.
Did my comment help/offended you? Use the Karma button!!
LÖVEing each day...
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Beginner: Can't run the HelloWorld tutorial

Post by Nixola »

You have to save the .lua file using the UTF-8 encoding without BOM, that'll fix it
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
tv_user
Citizen
Posts: 57
Joined: Sun Aug 12, 2012 4:39 pm
Location: Portugal

Re: Beginner: Can't run the HelloWorld tutorial

Post by tv_user »

OMG thank you, thank you! It worked! I had to install TextWrangler, but anyway, now it just works fine. :awesome:
Did my comment help/offended you? Use the Karma button!!
LÖVEing each day...
warka0OO
Prole
Posts: 1
Joined: Tue Dec 11, 2012 12:24 pm

Re: Beginner: Can't run the HelloWorld tutorial

Post by warka0OO »

Hi everyone,

I cannot run this simple example too with Sublime Text 2. In fact, when i write "helloworld" it's working but not with a space like "hello world".
The build works but the app crash. I've check, ST2 already encode in UTF8 without BOM (by default).

It's very frustrating, someone can help for this ? :)
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Beginner: Can't run the HelloWorld tutorial

Post by Nixola »

I bet you've got an Ati/AMD video card, it's a problem some of them have. If that's the case,
Boolsheet wrote:Your ATI driver has a bug that crashes with a certain part of the code in LÖVE 0.8.0. Try this build, it includes a workaround.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Post Reply

Who is online

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