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
false somewhere else. Anyway, this code...
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
Based on the limited code you posted, my best guess is that instead of this:
if player = has_ball(true):
... you want something like this:
current_player = has_ball
That will set
current_player to the value of
has_ball (true or false).