Can anyone explain what is wrong with this function [SOLVED]

function on_message(self, message_id, message, sender)
	if message_id == hash("up_pos") then
		print("good")
	end
end

This is the code, all I’ve done to it is make a script deleted all function except on message, but when I try to build the game it spits out a load of errors.

image
These are the errors. I don’t know what I’ve done. as you can see there is no line 8, 10 or 26 so I don’t know what has happened.
I’m starting to think my install is haunted.
Any help is greatly needed. Thanks.

1 Like

Do the errors still pop up if you restart Defold?

No they dont. Why does that happen though. Thanks

The linter that checks your code when building the project might get stuck on an old version of the script, especially if you don’t save it.

1 Like

Ok thanks for the help.

We’re going to look into this soon!

3 Likes

We found and fixed an issue in the editor that caused the linter to think that the code is broken when it isn’t, please update the editor.

4 Likes

Will do. Thanks