Skip to content

Commit ce2a1b5

Browse files
authored
Merge pull request #10741 from RazerTexz/patch-1
String.format() wrong placeholder syntax
2 parents bfa102b + 820fdbe commit ce2a1b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/scripting/gdscript/gdscript_format_string.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ GDScript format strings
66
Godot offers multiple ways to dynamically change the contents of strings:
77

88
- Format strings: ``var string = "I have %s cats." % "3"``
9-
- The ``String.format()`` method: ``var string = "I have {} cats.".format([3])``
9+
- The ``String.format()`` method: ``var string = "I have {0} cats.".format([3])``
1010
- String concatenation: ``var string = "I have " + str(3) + " cats."``
1111

1212
This page explains how to use format strings, and briefly explains the ``format()``

0 commit comments

Comments
 (0)