What 'n/' error is in this?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dudedude123

I’m scripting the teams in my basketball game

# Called when the node enters the scene tree for the first time.
func _ready():
	
	if offense:
		current_player = has_ball
	
	Globals.player ==
{
	frontcourt,
	backcourt,
	center
}
	
	for body in phys_area.get_overlapping_bodies():
		if body is RigidBody:
			ball = body
				return
	
if has_ball:
	has_ball.global_transform.origin = holding.global_transform.origin
	
	#pass  Replace with function body.

but theres an error:

Error parsing espression, misplaced ‘/n’

:bust_in_silhouette: Reply From: jgodfrey

There are a number of subtle errors in this code:

    Globals.player ==
{
    frontcourt,
    backcourt,
    center
}

What are you trying to do there? The braces ( {} ) make it look like a Dictionary, but the element assignments aren’t valid. Also, that == should likely be =. This is valid Dictionary syntax, but again, I’m not sure what you’re expecting to do there.

Globals.player = {
	"frontcourt": 1,
	"backcourt": 2,
	"center": 3
}

Notice that each item is both a key and a value.

Also, there seems to be various indention-related issues in the posted code.

:bust_in_silhouette: Reply From: LeslieS

The error is coming from this

Globals.player ==
{

You can’t split the line on an operator.
This is also the wrong operator. == is a comparison operator. You need the assignment operator =
Try changing to this:

Globals.player = {