How to change text to multiple strings

Godot Version

4.2.2

Question

$UI/label.text = yes + "-" + no

Basically I cannot have more than 1 value in a label node
it should say “3-9” if yes as 3 and no is 9

Have you tried using a comma instead of a plus sign

What exactly is the problem?
If yes and no are numbers, you need to convert them to strings first:
$UI/label.text = str(yes) + "-" + str(no)

3 Likes