Syntax error

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
taka
Prole
Posts: 2
Joined: Wed Mar 06, 2013 11:56 am

Syntax error

Post by taka »

Hello :awesome: this is my first time using love2d, i am using sockmunkeedev's tutorials which are really helpful, to learn how to code and create games.As i was following his tutorials i got stuck with getting an error(Syntax error: main.lua:1: '=' expected near 'player'), so i was wondering if you guys could help me with this :ultrahappy:
I have added the .love file so you guys can check it out
Attachments
game.love
(1.81 KiB) Downloaded 123 times
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Syntax error

Post by micha »

Hi,

welcome to the löve community.

first a general comment: If löve tells you about an error, it always says where the error is. In this case

Code: Select all

main.lua:1
means first line in main.lua.

The solution: You forgot the quotation marks in the require commands. Put

Code: Select all

require "player"
require "map"
then the error is gone.

You get some other error after that one, mostly typos: In one file you put a "=" instead "-", you misspelled keyboard in one file and last you forgot one "end" in the map collision part.
After you fix these errors, it works.
taka
Prole
Posts: 2
Joined: Wed Mar 06, 2013 11:56 am

Re: Syntax error

Post by taka »

haha thank you so much ^^ now i will get back to learning more
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 3 guests