Can anyone help me fix Invalid set index 'text' (on base: 'null instance') with value of type 'String'?

Godot Version

v4.1.3

Question

i am always getting invaild set index text. here the script:
extends Node

var achievements = {
“pressing button”: false,
“test”: false
}

var achievements_name = {
“pressing button”: “button”,
“test”: “testing”
}

Called when the node enters the scene tree for the first time.

func _ready():
unlocked(“test”)

Called every frame. ‘delta’ is the elapsed time since the previous frame.

func _process(delta):
pass
func unlocked(achievement_unlock):
achievements[achievement_unlock] = true
print(achievements)
%title.text = achievements_name[achievement_unlock]

“invalid set index anything”
The problem is not with that “anything”, the problem is that the engine does not know anything about “%title” and therefore that “anything” is a mystery to it

change this
%title.text = achievements_name[achievement_unlock]
for this
print(%title)
It shouldn’t print anything pretty