Compile error message?

When I try to compile the following code, there seems to be an error with the last method.(Blip:draw)
The function declaration line is highlighted in red but there is no message indicating what it thinks is wrong.

When I swap the order of the methods in the file, the error changes to the last method in the file. But still no error message.

Is there a way to get an error message so I can tell what is going wrong?

thanks
peter

Blip = class()

function Blip:init(x, y, q)
    -- you can accept and set parameters here
    self.x = x
    self.y = y
    self.q = q
    self.spriteFlag = 0
end

function Blip:touched(touch)
    -- Codea does not automatically call this method
    if (self.spriteFlag == 0) then
        self.spriteFlag = 1
    else
        self.spriteFlag = 0
end

function Blip:draw(x, y)
    -- Codea does not automatically call this method
    if (self.spriteFlag == 0) then
        sprite("Small World:Chest", x + self.x, y + self.y)
    else
        sprite("Small World:Chest Bottom", x + self.x, y + self.y)
end

I don’t know about any such way but the problem with your code is that you did not finish your if blocks with an end statement, i.e. if … then … else … end

Heh, another victim of the backspace bug ? :stuck_out_tongue:
I had that but it was in a separate file that I barely ever touched. It took me like 30 minutes to find the missing “end” :frowning:

Yes of course. Thanks