display.newRect ')' expected near '=' Issue?

I’m trying to do some coding and I’m a beginner while watching a walkthrough video but I have this problem. I have it exactly as the youtuber but this issue shows up.

local physics = require(“physics”)
physics.start()
local circle = display.newCircle( display.contentCenterX, display.contentCenterY, 20)
physics.addBody(circle, “dynamic”, {density = 1.0, friction = 0.3, bounce = 0.2})

local floor = display.newRect(0, display.contentCenterY = 150, display.contentWidth, 4)

The problem says main.lua:6: ‘)’ expected near ‘=’

Line 6 doesn’t have any issues so whats the problem?

local floor = display.newRect(0, display.contentCenterY = 150 , display.contentWidth, 4)

You can’t assign a value there.  You can do basic math like display.contentCenterY - 150, but you can’t make display.contentCenterY equal to 150 for two reasons.  First, you can’t do assignments in the middle of a function call’s parameter list like that.  Secondly display.contentCenterY is a constant and can’t be updated.

Rob

local floor = display.newRect(0, display.contentCenterY = 150 , display.contentWidth, 4)

You can’t assign a value there.  You can do basic math like display.contentCenterY - 150, but you can’t make display.contentCenterY equal to 150 for two reasons.  First, you can’t do assignments in the middle of a function call’s parameter list like that.  Secondly display.contentCenterY is a constant and can’t be updated.

Rob