#Does godot support "{0}".format(var)?

1 messages · Page 1 of 1 (latest)

vocal cairn
#

Do you have to use %s, %d, etc or can you use "{0}".format(var)

example
func _run():
var food = "cereal"
print("{0}".format(food))

I have godot 4.4, chatgpt says my code should work but it just prints {0}
What am I doing wrong?

chrome grove
#

it does not support {0}

#

(check the docs! This one is easy to solve with research! 🙂 )