Noob, pls help health bar not working

I’ve been trying to code in Godot I’m very new I’ve been following a tutorial for some code and its on godot 3 I tried to do this

func set_health(Progressbar, health, max_health):
Progressbar.value = health
Progressbar.max_value = max_health
Progressbar.get_node(“Label”).text = “HP:%d/%d” % [health, max_health]

but I keep getting this error

invalid set index ‘value’ (on base label) with value type of ‘int’

on this line

Progressbar.value = health

I tried to box it in str() but that gave the same error but with str instead of int

I have no idea how to fix

func set_health(Progressbar, health, max_health):
Progressbar.max_value = max_health
Progressbar.value = health
Progressbar.get_node(“Label”).text = “HP:%d/%d” % [health, max_health]

try setting the max_value before the value

change to this:

Progressbar.get_node(“Label”).text = "HP:%s/%s" % [str(health), str(max_health)]

The error says that Progressbar is a label node, not a progress bar node (wrong type).
You’re passing the wrong node to the function?