I am very new to GDscript. I am trying to write a simple if else statement but i am getting "error(25,21): Unexpected assign" on the first line of the if statement. Here is the code. Thanks for any help you can offer
extends Control
onready var CurrPlayerView = 1
func _ready():
get_node("SwitchPlayerLeftBtn").connect("pressed",self,"on_SwitchPlayerLeftBtn_pressed")
func _on_SwitchPlayerLeftBtn_pressed():
if (CurrPlayerView = 0):
CurrPlayerView = 6
else:
CurrPlayerView = CurrPlayerView + 1