Code help

This code won’t work, help?





-- Use this function to perform your initial setup
function setup()
    print("Move your finger around")
end

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
        background(0, 0, 0, 255)
    -- This sets the line thickness
    noSmooth()
    
    if CurrentTouch.state == BEGAN then
        fill(255, 207, 0, 255)
        elseif CurrentTouch.state == MOVING then
        fill(0, 125, 255, 255)
        elseif CurrentTouch.state == ENDED then
        fill(255, 0, 40, 255) 
    end
    end
    
        ellipse(CurrentTouch.x,CurrentTouch.y,50,50)

    ~~~

The code block won’t work right

@Mason Try this.


-- Use this function to perform your initial setup 

function setup() 
    print("Move your finger around") 
end

-- This function gets called once every frame 

function draw() 
    -- This sets a dark background color 
    background(0, 0, 0, 255) 
    -- This sets the line thickness 
    noSmooth()

    if CurrentTouch.state == BEGAN then
        fill(255, 207, 0, 255)
    elseif CurrentTouch.state == MOVING then
        fill(0, 125, 255, 255)
    elseif CurrentTouch.state == ENDED then
        fill(255, 0, 40, 255) 
    end
    ellipse(CurrentTouch.x,CurrentTouch.y,50,50)
end