Pie gui fill angle help (solved)

getting the error "Bad arguement #1 to ‘set_fill_angle’ (NodeProxy expected, got string)
the code for that:

gui.set_fill_angle("bar", self.hp)

tried setting it to a variable then calling it;

bar = gui.get_node("bar")
gui.set_fill_angle(bar, self.hp)

that got the error “bad arguement #1 to ‘set_fill_angle’ (hash expected, got nil)”
can anyone tell me how i should do this?
also prob very bad formatting

typo, the second error was gui.get_node, not gui.set_fill_angle

I don’t understand. Did you manage to solve it?

This should work:

bar = gui.get_node("bar")
gui.set_fill_angle(bar, self.hp)

that worked, thank you!

also no i didn’t solve it yet but your code worked. thanks for helping!