Having trouble undestanding %s For variable strings on GD script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Arycesar

here´s the code
what could i have done wrong?
i get the error incomplete format in operator %

func _ready():
var prompts = [“lindo”,“maravilhoso”,“não”,“mais”]
var story = “Isso é %s e eu achei %s. Mas %s quero s%.”
print(story % prompts)

:bust_in_silhouette: Reply From: Ev1lbl0w

It might be that last formatting operator, it’s s% when it likely should be %s.

yes! thank you.
learning this can be tough at times.
i have so much trouble spotting my own mistakes.

Arycesar | 2022-08-24 13:44