Unexpected token

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

So i have a problem with my little game it says “Unexpected token ‘$’:” heres the code:
extends Node

var experience = 0

func _ready():
$TextureButton/Label.text = str(experience)

func _on_TextureButton_pressed():
experience += 1

$TextureButton/Label.text = str(Experience)

Dont know why it doesent work.

:bust_in_silhouette: Reply From: mdubaisi

Mostly it’s because you changed a name of a node and forget to rewrite the path. So check the names of the nodes and rewrite their paths.