Hello 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
I have added the .love file so you guys can check it out
Syntax error
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Syntax error
- Attachments
-
- game.love
- (1.81 KiB) Downloaded 123 times
Re: Syntax error
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
means first line in main.lua.
The solution: You forgot the quotation marks in the require commands. Put
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.
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
The solution: You forgot the quotation marks in the require commands. Put
Code: Select all
require "player"
require "map"
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.
Check out my blog on gamedev
Re: Syntax error
haha thank you so much now i will get back to learning more
Who is online
Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 3 guests