Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

My code gives out error, please help.

edited November 2016 in Questions Posts: 1

I am just a beginner, my code gives out an error, please let me know what's wrong and how do I make it work. I am just trying to get my text 'Hello world' to display at 500 from the right edge and 400 from the bottom edge. The error appears on the text function line, it says that: ')' expected near 400, what does that mean?

This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(70, 192, 68, 255)

    -- This sets the line thickness
    strokeWidth(5)

    -- Do your drawing here
    text("Hello, world(!"400, 500) 
end

Comments

  • dave1707dave1707 Mod
    edited November 2016 Posts: 7,612

    @Sasha Here's your code with everything you don't need removed. Compare the text line here with yours to see what was wrong.

    function draw()
        background(70, 192, 68, 255)
        text("Hello, world!",400, 500) 
    end
    
Sign In or Register to comment.