get_node issue

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

So I’m trying to follow a tutorial but at the start I’ve already had a issue I’m trying to get a label to update with as its a idle game, I’m confused all the code is a main script called homescript which labels all the
var Money : 0
var Gems
var Producer1
var Producer1Raw
var Producer1Speed
var Producer1Roc
var Producer1MultT1
var Producer1MultT2
var Producer1MultT3
var Producer1MultT4
var Producer1MultT5
var Producer2
var Producer2Raw
var Producer2Speed
var Producer2Roc
var Producer2MultT1
var Producer2MultT2
var Producer2MultT3
var Producer2MultT4
var Producer2MultT5
var Producer3
var Producer3Raw
var Producer3Speed
var Producer3Roc
var Producer3MultT1
var Producer3MultT2
var Producer3MultT3
var Producer3MultT4
var Producer3MultT5
var Producer4
var Producer4Raw
var Producer4Speed
var Producer4Roc
var Producer4MultT1
var Producer4MultT2
var Producer4MultT3
var Producer4MultT4
var Producer4MultT5
var Producer5
var Producer5Raw
var Producer5Speed
var Producer5Roc
var Producer5MultT1
var Producer5MultT2
var Producer5MultT3
var Producer5MultT4
var Producer5MultT5

Then in the Store scene the code is:
func _ready():
$counter.text = “Cash: var.Money”

(the scene is just
Main Window
Store (Panel)
$counter (label)

:bust_in_silhouette: Reply From: Ertain

Here’s the Store scene cleaned up.

func _ready():
    $counter.text = "Cash: " + str(Money)

Also, the variable Money needs to be changed to:

var Money: int = 0

May I suggest learning about GDScript and possibly the principles of object oriented programming.