extends Area
export var goldToGive : int = 1
var rotateSpeed : float = 5.0
func _process(delta):
rotate_y(rotateSpeed * delta)
func _on_GoldCoin_body_entered(body):
if body.name == "Player":
body.give_gold(goldToGive)
queue_free()
func give_give (amount):
gold += amount <---
This is my code, I am trying to create a gold system, I have already added a variable to my Player, but whenever I try to add the line marked above it gives me this error: "Identifier "gold" isn't declared in current scope"