Cannot assign a new value to a constant Godot 4

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

Why does this code give out such an error? Why is arg_name a constant

func func_name(arg_name: Char___ = null):
    arg_name = 123

Char___ is a custom class name

:bust_in_silhouette: Reply From: Gluon

I think char is a protected set of characters. You would get an error for example if you created a variable called func because to the programming language that has a specific meaning. Try changing the name of the variable to something else.

No, changing the class name does not help

Alexandr | 2022-11-30 07:56