There are a few things wrong there.
First, to compare one thing to another, you need to use==
. The (single) =
is to assign a value to something.
Next, I see that you have a variable named has_ball
. I guess that gets set to true
or false
somewhere else. Anyway, this code...
has_ball(true)
is treating has_ball
like it's a function instead of a variable - which won't work either.
Also, that lone current_player
won't work. I assume that's a boolean variable that also needs to be set to true
or false
.
Based on the limited code you posted, my best guess is that instead of this:
if offense:
if player = has_ball(true):
current_player
... you want something like this:
if offense:
current_player = has_ball
That will set current_player
to the value of has_ball
(true or false).