Page 1 of 1
[SOLVED]Problem with basic example on wiki
Posted: Thu Feb 21, 2013 11:41 pm
by Z0MBiE
I've recently installed Linux and decided to give Love a go on it, thought I'd do a basic message from the wiki:
Code: Select all
function love.draw()
love.graphics.print("Hello World", 400, 300)
end
but it's giving me the error:
Code: Select all
Error: Syntax error: main.lua:3: '=' expected near ' '
stack traceback:
[C]: at 0x0047e930
[C]: in function 'require'
[string "boot.lua"]:331: in function <[string "boot.lua"]:227>
[C]: in function 'xpcall'
any ideas? It's probably something really simple I've missed knowing my luck
Re: Problem with basic example on wiki
Posted: Thu Feb 21, 2013 11:44 pm
by josefnpat
Can you post your installed love version?
Re: Problem with basic example on wiki
Posted: Thu Feb 21, 2013 11:47 pm
by Z0MBiE
josefnpat wrote:Can you post your installed love version?
Sure can:
Code: Select all
$ love --version
LOVE 0.8.0 (Rubber Piggy)
EDIT: You know what, ignore this. I was being lazy and copy/pasting the code to the console. I'm guessing something slipped in there that shouldn't have. Works perfectly fine after typing it in manually.
Lesson learned. Sorry for wasting your time.
Re: Problem with basic example on wiki
Posted: Thu Feb 21, 2013 11:51 pm
by josefnpat
Can you provide your exact steps to doing this?
I repeated the process just now, and it worked.
Code: Select all
mkdir test
cd test
touch main.lua
nano main.lua
love .
main.lua contains, and only contains;
Code: Select all
function love.draw()
love.graphics.print("Hello World", 400, 300)
end
Re: Problem with basic example on wiki
Posted: Thu Feb 21, 2013 11:52 pm
by Z0MBiE
Edited my previous post, sorry about this.
Re: [SOLVED]Problem with basic example on wiki
Posted: Fri Feb 22, 2013 7:21 am
by bartbes
Looks like you had some invisible unicode character in there or something.
Re: [SOLVED]Problem with basic example on wiki
Posted: Fri Feb 22, 2013 8:33 am
by miko
bartbes wrote:Looks like you had some invisible unicode character in there or something.
Right, most probably
"hard space"