The setter function isn't defined

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

The setter function isn't defined

I cant understand, why it is? how can I fix this issue. please help me. Thanks!

:bust_in_silhouette: Reply From: kidscancode

You wrote

var score = 0 setget set_score

That means that you want the setter function to be called “set_score”. You have no function defined with that name. You do have

func set_get(new_score):

But I think that’s not what you meant to name that function.