Whats causing this 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
SirFotherington
Prole
Posts: 11
Joined: Sat Feb 23, 2013 11:29 pm

Whats causing this error?

Post by SirFotherington »

menu.love
(2.54 KiB) Downloaded 155 times
Untitled.png
Untitled.png (27.1 KiB) Viewed 1043 times
Im getting this error in my coding. What is causing it/how would I fix it?
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Whats causing this error?

Post by micha »

This tells you that you need to add an "end" somewhere. To be more precise, lua believes, that the function, that is defined in line 42, does not have and "end".

This is in line 42 and following:

Code: Select all

function love.mousepressed(x,y)
  if gamestate == "menu" then 
	
  button_click(x,y)

end
You forget the "end" of the if-statement, so lua believes the "end" there belongs to the if-statement and the "end" for the function itself is missing.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests