Methods and variables overriding error

Godot Version



I’m making a card game where I have a superclass

class_name Effect extends Node

var hasFieldEffect: bool

func setHasFieldEffect(hasFieldEff: bool):
   hasFieldEffect = hasFieldEff


Then I made a subclass

extends Effect

# I tried writing: hasFieldEffect = true but it gave me an error
# even though the program was still working

func _init():
# This also gave me an error