Help with Random Picture code

Does anyone know what is going on here? It keeps saying “Syntax error near ‘PICTURES’”

I am trying make it so when you take a picture, a random image shows up. Here is the code:

function setup
    PICTURES = {sprite("Project:Ghost_1"), sprite("Project:Ghost_2"), sprite("Project:Ghost_3") --picture"
    -- Create a couple buttons for our camera source
    parameter.action("Front Camera", function()

    parameter.action("Back Camera",  function()

    parameter.action("Take Photo", takePhoto)

    -- Start using the front camera
    -- A variable to hold our captured photo
    capturedImage = nil

function takePhoto()
    capturedImage = image(CAMERA)

-- This function gets called once every frame
    -- This sets a dark background color
    background(27, 40, 31, 255)

    -- This sets the line thickness

    -- Get the size of the current camera texture
    local camWidth, camHeight = spriteSize( CAMERA )

    -- Draw the special CAMERA sprite
    sprite( CAMERA, WIDTH/2, HEIGHT/2, math.min( camWidth, WIDTH ) )

    -- Draw our captured image if available
    if capturedImage ~= nil then
     local c = math.random(1, #PICTURES)
        sprite(#PICTURES, WIDTH/2 - 100, 0, 200)

Please keep in mind that I am still a newbie!

Post your code, we can’t guess the error

@Ignatz I know, but I don’t know how to.

Select your code in Codea. Press copy. Come back to this page. Paste.

If you want the code to look nice on the forum put three tildes ~~~ at the top and bottom of the code block after you paste it here.

Copy your code and paste it.

@Ignatz I updated it.

It’s print(“This”), not (print(“This”))

I suggest you read up on Lua, which Is the language behind Codea. I wrote a couple of ebooks while I was learning it, which may help